Hacker News new | ask | show | jobs
by bjoli 22 days ago
and you get concurrentML. People get all wet in the pants by the actor model and CSP, but my god CML is much nicer in every way.

I had a weird introduction to programming. I spent my first half year doing php, and them went all in on scheme and sml. Which is nice in many ways, but I do have a hard time accepting many of the completely braindead (subjective opinion, of course) choices of most of the popular languages.

I do think clojure is a pretty nice compromise. Rich has good taste, obviously. Clojure's core.async could be less async and more CML in my taste. Wrapping a simpler async api in cml is easy. Implementing CML on top on core.async is either very hard or full of compromises.

1 comments

Could you share more about what makes CML so awesome?
it is like CSP but with first class events. In CSP you have to manage complex protocols yourself, whereas in cml you can compose larger even trees and then do one sync.

a classic example of something that is trivial in cml but requires a mediator in CSP or go is two fibers swapping values atomically where a fiber can pull out at any time. in cml it is about 20 lines of code that can be in a library. it composes with other events.

in csp it is a "server" that manages the swap which means you lose the sectability.

Evert time you want to have any kind of protocol, cml wins.