4 ms·
Yes, as far as I know Reason is the first project to try to have auto-currying semantics with tupled syntax. It's definitely a bit of an experiment. Not sure w
by yawaramin 9y ago
Yes, as far as I know Reason is the first project to try to have auto-currying semantics with tupled syntax. It's definitely a bit of an experiment.
Not sure what optimisation problem you're referring to, Reason and OCaml underlying AST are exactly the same. There are no actual tuples unless the programmer is creating actual tuples.
- bjz_ 9y agoI was referring to chenglou's comment[1] where he said "It also prevents some optimizations and new type features." [1]: https://news.ycombinator.com/item?id=15573956 https://news.ycombinator.com/item?id=15573956
- glennsl 9y agoI think what @chenglou was referring to are issues like the "value restriction" [1] and the need to wrap "uncurried" FFI functions with a function that "adapts" it to curried form, thereby adding a layer of indirection. Reason does not solve these, they're problems inherent to the underlying language and the choices made. I think the point being made was just that currying isn't a clear step forward, but causes some problems as well. [1]: http://mlton.org/ValueRestriction http://mlton.org/ValueRestriction
- bjz_ 9y agoYeah, definitely agree that there are trade-offs with currying when mapping it to a compilation target like JS, and I am consistently impressed by Bucklescipt's ability to convert the curried versions of functions to regular JS calls. That said, I do still think that it's worth the trouble!