News for hackers. Stuff that matters.
Re:ReasonML: Strict, powerful and forgiving by int_19h on Saturday November 10, 2018 @10:49PM (#18424938)
It's not just about the curly braces - there are many warts about OCaml's syntax, and some of them go beyond mere niceties, and into the territory of making it too easy to unintentionally write code that doesn't do what the author intended. In Reason, it looks like they specifically went after those, e.g.:

https://reasonml.github.io/docs/en/comparison-to-ocaml#patte...

Re:ReasonML: Strict, powerful and forgiving by jarcane on Sunday November 11, 2018 @01:32AM (#18425263)
If Reason uses == to represent OCaml's =, and uses === to represent OCaml's ==, then how would Reason represent OCaml's === symbol (if it were defined)? Reason provides a way! "Escape" the triple equals symbol!

Yes, such a massive improvement to clarity.

Seriously there is nothing here I hadn't internalized within a day of working with F# or Python. Certainly nothing that justifies forking an entire alternate syntax.

Re:ReasonML: Strict, powerful and forgiving by int_19h on Sunday November 11, 2018 @02:13AM (#18425344)
> Yes, such a massive improvement to clarity.

Given that === is not a standard operator in OCaml, I fail to see the problem with clarity.

> Certainly nothing that justifies forking an entire alternate syntax.

You do realize that this is very much a subjective judgment, do you? Syntax does matter. You can argue that it doesn't matter enough to bother, but that's down to personal taste. Given the popularity that Reason seems to be enjoying, clearly, syntax is a sore point for enough people.

In any case, I fail to see the problem in general. Reason doesn't fragment the OCaml ecosystem, really, since it's just a different syntax for the same core language, and libraries etc remain. It's not any different than all the macro libraries for Lisps. Nobody is forcing you to use them, and you can still use a library written in Reason from OCaml, and vice versa. There's no real fragmentation.

And if Reason ever dies, all code that's written in it could just be converted to OCaml using the last version of their transpiler, and maintained as such thereafter.

So, what's the problem?

Re:ReasonML: Strict, powerful and forgiving by jarcane on Sunday November 11, 2018 @03:50AM (#18425531)
Nobody is forcing you to use them, and you can still use a library written in Reason from OCaml, and vice versa.

You really should go read up about this, because the actual answer is far more complicated than advertised. Hell, the Ocaml interop section in the official docs isn't even finished yet.

Re:ReasonML: Strict, powerful and forgiving by int_19h on Monday November 12, 2018 @01:48AM (#18431002)
Most of the complexity seems to be stemming from the JS backend, so far as I can see, which is not really Reason's fault. What are the OCaml interop issues when using Reason with the native backend?
Re:ReasonML: Strict, powerful and forgiving by Paradigma11 on Sunday November 11, 2018 @05:22PM (#18429035)
"... write code that doesn't do what the author intended."

But this code does not compile. Even if you do not use https://github.com/ocaml/merlin you will always realize it at compile time. What type is y supposed to be to pass compilation?

Re:ReasonML: Strict, powerful and forgiving by AlexCoventry on Saturday November 10, 2018 @11:27PM (#18425039)
In practice, your editor's indentation will alert you to the compiler's interpretation of the pattern match.