Isn’t core.async contrary to Clojure principles?

The first concern – yes the core operations are side effects. However channels don’t have the problems normally associated with mutable references as they don’t represent a “place” – channels are opaque, you cannot inspect them, in fact you can’t even query whether a channel is closed or not beyond reading nil.

The second concern – doing anything more than shallow yield would mean whole program transformation. This is a tradeoff and I think a reasonable one. The level of composition is channels not go blocks and they compose just fine.

The final concern, you can easily do Rx style map/filter/reduce operations over channels and people have already done so.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)