Fork me on GitHub
#clojure-europe
<
2024-03-10
>
otfrom11:03:52

morning

šŸ‘‹ 1
Ben Sless19:03:15

I promised I'll share what I cobbled together, this is by no way an authoritative source. Still, there's a chance we could hammer out something useful, so your thoughts, feedback and contributions are welcome https://github.com/bsless/100-clojure-mistakes

šŸŽ‰ 7
šŸ‘€ 1
seancorfield21:03:10

This is great! Still reading thru it...

genmeblog21:03:21

Great stuff! Two things: when you write 'something vs something' it's not clear which is wrong and which is good practice (and why, for example in namespaces)

šŸ™ 1
āž• 1
genmeblog21:03:58

And second. There is no :constant tag. It's :const. It causes numerical values to be inlined.

šŸ™ 1
Ben Sless03:03:22

Thanks for the correction. Not just numerics iirc

flowthing07:03:15

Great idea and lots of good content already! A couple of additions spring to mind: ā€¢ pmap ā€¢ fire-and-forget future swallowing exceptions ā€¢ using reduce without explicit init ā€¢ concat https://stuartsierra.com/2015/04/26/clojure-donts-concat

āž• 1
Ben Sless07:03:29

Categorizing: ā€¢ pmap, future: concurrency ā€¢ reduce: ?? ā€¢ concat: laziness

šŸ‘ 1
genmeblog11:03:43

In case of constants: strings and primitives are inlined. Any other objects are used as a static final var instead of a calling a getRootRoot().

flowthing06:03:16

One more: memoize being unbounded and never evicting (not sure about the category).