News for hackers. Stuff that matters.
Re:ReasonML: Strict, powerful and forgiving by jarcane on Saturday November 10, 2018 @04:12PM (#18423536)
So ReasonML is actually a Javascript-like syntax for OCaml, and its tool-chain converts Reason code to OCaml, which then uses a tool called Bucklescript to convert that OCaml to Javascript.

All because some people just have to have their curly braces.

I will never stop being angry that this exists. There is no reason for it other than pedantic bikeshedding and Facebook’s mission to proprietize web tech. It does nothing but mangle a perfectly readable syntax and bifurcate the ecosystem of the language.

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.
Re:ReasonML: Strict, powerful and forgiving by thatswrong0 on Saturday November 10, 2018 @04:30PM (#18423621)
Making a language feel more familiar to the developers that would likely be using it will probably speed up its adoption and decrease the learning curve for new developers. I don't understand what is so enraging about that.
Re:ReasonML: Strict, powerful and forgiving by jarcane on Sunday November 11, 2018 @03:48AM (#18425526)
No one did this for Python.

People still complain about it, but somehow, it became one of the most popular languages on the planet.

And how is it welcoming to newcomers to essentially be upfront asking them "right, now which syntax will you use?"

Unless the answer of course is just to nudge them all in the direction of the one owned by a massive corporation with more money than some countries ...

Re:ReasonML: Strict, powerful and forgiving by bobbby on Sunday November 11, 2018 @05:03AM (#18425681)
How's the uptake for ocaml going? Its had 20 years maybe next year will be its year?
Re:ReasonML: Strict, powerful and forgiving by zem on Saturday November 10, 2018 @04:38PM (#18423653)
reason is fully compatible with ocaml. nothing has been bifurcated. it is not even the first alternative syntax - the "revised syntax" had been around forever. https://caml.inria.fr/pub/docs/manual-camlp4/manual007.html
Re:ReasonML: Strict, powerful and forgiving by jarcane on Saturday November 10, 2018 @05:29PM (#18423872)
Reason compiles to Ocaml, yes. Does Facebook actually want you to just use Ocaml? Sure doesn't seem that way to me. Facebook is pushing their own tool, and their own libraries to go with it. Interoperability between Reason, Bucklescript, Ocaml native, OPAM libs, and the various build tools in between is confusing and ill-defined. The path of least resistance just seems to be "stay in our garden... there's no walls technically, but good luck hopping back and forth".

And all because some people are allegedly pathologically incapable of understanding a language without bolting curly braces on it.

It's the most absurd overcorrection for a pedantic complaint I've ever seen in tech.

Re:ReasonML: Strict, powerful and forgiving by StreamBright on Saturday November 10, 2018 @06:47PM (#18424157)
>>> Does Facebook actually want you to just use Ocaml?

Facebook already uses OCaml.

https://github.com/facebook/infer

Re:ReasonML: Strict, powerful and forgiving by Klathmon on Saturday November 10, 2018 @08:17PM (#18424486)
They use it for a few different projects:

https://github.com/facebook?language=ocaml

Re:ReasonML: Strict, powerful and forgiving by emmelaich on Saturday November 10, 2018 @11:16PM (#18425005)
> Reason compiles to Ocaml ..

My understanding is that it can be translated both ways with no difference of semantics.

Re:ReasonML: Strict, powerful and forgiving by ohadrau on Saturday November 10, 2018 @06:56PM (#18424194)
I know this is getting downvoted a ton, but I certainly felt the same way before using Reason. Even now, I'm sort of undecided about my opinion on it. I love how accessible it makes OCaml (which I think it does, people pay more attention to syntax than they really ought to) but I'm always afraid that it's going to cause native OCaml to be abandoned. Reason can also sometimes make code needlessly complex IMO because it hides some of the really clear aspects of OCaml's syntax. That said, it's improved a ton since it was first released and no longer feels like a weird soup of mixed up languages.