News for hackers. Stuff that matters.
Re:A First Reason React App for JavaScript Developers by idibidiart on Friday June 23, 2017 @06:46PM (#14623334)
I was told that concurrency primitives can be built on top of algebraic data types, so I intend to learn more. I was also told that ReasonML does not yet support algebraic data types. What am I missing?
Re:A First Reason React App for JavaScript Developers by chenglou on Friday June 23, 2017 @11:29PM (#14624245)
I think you meant "algebraic effect", which most mainstream languages don't have: http://kcsrk.info/ocaml/multicore/2015/05/20/effects-multico...

Algebraic data types are a basic feature.

Re:A First Reason React App for JavaScript Developers by idibidiart on Friday June 23, 2017 @11:36PM (#14624256)
Oh 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.

Re:A First Reason React App for JavaScript Developers by chenglou on Saturday June 24, 2017 @12:06AM (#14624312)
Algebraic 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.

Re:A First Reason React App for JavaScript Developers by continuational on Saturday June 24, 2017 @04:22AM (#14624843)
I 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/