4 ms·
Ah yes, Clojure has no first-class support for aspects. Its easy enough to monkey patch definitions for the rare case when its needed. Most of the time however
by jeremiep 10y ago
Ah yes, Clojure has no first-class support for aspects. Its easy enough to monkey patch definitions for the rare case when its needed.
Most of the time however I try to avoid aspects as they introduce hidden behaviour in existing functions, which can be hard to reason about at scale, especially with more than a few developers.
- junke 10y agoI use them all the time. It's a great way to separate responsibilities.
- jeremiep 10y agoI prefer function composition for that when possible :) Aspects I feel are more useful when you want to modify the behaviour of existing code you don't own. Maybe if I had easy access to them I'd find more use cases :)