4 ms·
Actually 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
by _halgari 13y ago
Actually 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?