3 ms·
So, it seems to me that the goal of the original video was "look how easy it is to do various concurrency patterns in Go", and presumably the goal of working th
by sanderjd 13y ago
So, it seems to me that the goal of the original video was "look how easy it is to do various concurrency patterns in Go", and presumably the goal of working through Clojure versions of the same is "let's see if it's just as easy to do the same using Clojure's core.async!". In light of this discussion, I think that no, it is not as quite as easy (or simple?), and the subtle ways in which it is harder can be deceptive.
- _halgari 13y agoActually it's that you have more options in core.async. In some cases you want dedicated threads, other times you want lightweight threading. Core.async allows for both models. Simplicity doesn't always mean "one" it means decoupling related ideas. Sometimes simpler means more things that each do one thing. Notice how Clojure has refs, atoms, vars, and agents. Each does something completely different, each with its own tradeoffs and bonuses. Coupling reduces flexibility by throwing all the tradeoffs (often with additional issues) into one large pile. So I see core.async as being inline with the Clojure ideals. Pull things apart and offer only simple primitives that can be combined to create larger systems.
- icebraining 13y agoIn golang you can just do LockOSThread() to reserve the OS thread for your current goroutine. What's the advantage of having two separate models and APIs?
- pcwalton 13y agoI think this will practically always be true when porting a tutorial designed for language X to language Y, because tutorials designed with one language in mind tend to play to that language's strengths. Porting a Clojure-oriented tutorial to Go would demonstrate the same effect.
- sanderjd 13y agoVery fair point.