4 ms·
I think you meant "algebraic effect", which most mainstream languages don't have: http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multicore/ http://kcsrk.i
by chenglou 9y ago
I think you meant "algebraic effect", which most mainstream languages don't have: http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multicore/ http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multico...
Algebraic data types are a basic feature.
- idibidiart 9y agoOh yes. Thank you for the correction. The fancy name has kept me away so far... fearing it's yet another monad thing which I have not seen explained in a way that not only makes sense to a 5 year old but far more importantly show clearly and indelibly why it's so important to begin with. Same for any 'math theory' derived concepts. I hope ReasonML won't fall in that 'too smart for the average guy' category. the question I had asked that brought up 'algebraic effects' was: does ReasonML have optimized generator implementation which is an essential high level concurrency primitive. I was told generators and other concurrency primitives can be built on top of algebraic effects.
- chenglou 9y agoAlgebraic effects are kinda related to monad. Btw the ReasonML you're talking about is still just a syntax transform; you're really asking whether OCaml/BuckleScript has these implementations. There's no generators; but I do believe they can be built on top of algebraic effects. Regarding jargons: you don't have to worry about that =). Though I think what's more crucial is the way the jargons are conveyed, rather than the meanings themselves. I work in the ReactJS community, and there's basically as many jargons (some of which I myself don't quite understand...) as in FP, yet people seem fine with them. We're still not gonna go "monad this monad that" like you feared. Though if the JS community starts picking up terms like monads in the future thanks to Reason, then all the better.
- continuational 9y agoI understand why you feel that way. I've put together an alternative explanation of monads that I'd love some feedback on: http://www.ahnfelt.net/monads-forget-about-bind/ http://www.ahnfelt.net/monads-forget-about-bind/