Maybe you could back up your recommendations with tradeoffs and explain why you favour one over another, instead of just choosing one approach and advising against the other without a clear explanation of the implications.
I second this. We must make programming less dogmatic. Don't tell me what I shouldn't do: Teach me and let me choose with the tradeoffs in hand.
Another clear example is the seq vs empty? case. If the seq idiom is always preferred, why use empty? at all? Moreover, why not (defn empty? [x] (not (seq x)). This is not addressed at all (not even by the docstring!)
But it was a really good post nontheless! I learnt a few tricks myself that I didn't know about.
13
u/Borkdude Jun 06 '20
I would not recommend using merge instead of assoc in spots where performance matters. Please watch this talk: https://www.youtube.com/watch?v=3SSHjKT3ZmA&list=PLetHPRQvX4a-c3KDRTxxwGRmEMutL8Apf&index=16&t=0s