News for hackers. Stuff that matters.
Re:A ReasonReact Tutorial by klibertp on Thursday July 06, 2017 @07:38AM (#14709588)
It's not ALGOL-like syntax that's a problem with JS, it's the fact that for decades the JS syntax was frozen, without any significant additions to the initial, very minimal, syntax. The same is true for JS standard library: it's almost non-existent compared to Python or Ruby, and even Lua has more builtins (IIRC).

In other words, you can have good looking FP support with braces and semicolons. It's just that you need to build such support into the language, and for JS it was impossible for a long time.

Re:A ReasonReact Tutorial by erokar on Thursday July 06, 2017 @08:02AM (#14709690)
I'm not complaining that JS isn't Haskell. Underneath the C/Java syntax JS is a small, simle, Lispy, dynamic language — if you like that kind of thing. JS' syntax hide that. CoffeeScript helped reveal it.

> In other words, you can have good looking FP support with braces and semicolons.

Of course. But why would you?

Re:A ReasonReact Tutorial by jasim on Thursday July 06, 2017 @09:22AM (#14710173)
I love braces and semicolons and my biggest gripe with CoffeeScript and HAML and Python was that they used space to delimit blocks. The good thing about braces is that moving code around is easy and it makes auto-formatting possible. refmt, prettier etc. are all amazing to have.

But in terms of syntactic preferences, it is quite subjective and I wouldn't claim there is one true answer.

Re:A ReasonReact Tutorial by christophilus on Thursday July 06, 2017 @09:49AM (#14710367)
I agree. I wish the Reason team would just use BuckleScript and pure OCaml syntax. I really don't like the addition of syntactic noise that Reason has introduced.
Re:A ReasonReact Tutorial by jordwalke on Thursday July 06, 2017 @02:07PM (#14712459)
You already have that option. Reason's syntax is for the vast majority of developers that do not prefer OCaml's syntax, the majority of them not being OCaml programmers.