Live data from Hacker News

ReasonML: Strict, powerful and forgiving

harigopal.in

11–20 of 60 posts

Re: ReasonML: Strict, powerful and forgiving

#12
We chose ReasonML after a previous project of working with JS, React and Flow. We started using Reason back in May. The plan was to use typescript but after some great experiences with Rust on personal projects, I really wanted a language closer to Rust.

Our team loves using Reason and for me, it's been such a breath of fresh air. Working on front end code is a lot more fun because many of the frustrating things with JavaScript/React has been removed. The compiler is VERY fast and the language is well designed.

With that said, the learning curve is a bit much due to the lack of beginner friendly documentation. If you do not have experience with a ML like language (Rust, Swift, Scala, OcamL, F#) AND React, I think it will be painful. Despite that, it is totally worth learning.

The good news is that the core team realizes this and things are changing fast. React was originally designed for an ML based language and you can see the stark difference between JS React and ReasonReact. ReasonReact really is an eye opening experience.

Re: ReasonML: Strict, powerful and forgiving

#13

I tried using ReasonML for a blockchain project, and I just couldn't get past being able to express this logic of interacting with a third party library: ``` const contract = new web3.eth.Contract(ABI, contractAddress, {from}) ``` in ReasonML easily, despite spending hours on trying to figure it out. At the end I finally reached to a feature request asking to be able to do 'new' on member functions, and it was in 'pl…

You can embed raw js in reason/BS easily with [%raw ] iirc. Check the bucklescript documentaton, where the interop docs are located.

Re: ReasonML: Strict, powerful and forgiving

#14

We chose ReasonML after a previous project of working with JS, React and Flow. We started using Reason back in May. The plan was to use typescript but after some great experiences with Rust on personal projects, I really wanted a language closer to Rust. Our team loves using Reason and for me, it's been such a breath of fresh air. Working on front end code is a lot more fun because many of the frustrating things with…

The whole class component story in Reason felt kinda clunky, but with hooks this will probably not be a problem anymore.

Compared to the Rust compiler's performance, BuckleScript is a moloch, but as long as you don't try to run it on a t2.micro it works okay.

Re: ReasonML: Strict, powerful and forgiving

#16
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

#17
post #16

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 nothi…

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

#18
post #16

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 nothi…

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

#19
Avoiding reason-cli and just using bs-platform and reason-vscode together is the way to go in this ecosystem.

The problem with reason-cli is that it can get out of sync with the bs-platform version and fail in unclear ways.

There was quite a bit of pushback against reason at my shop due to the interop between these two packages and trying to do things like have autocompletion fail because of them.

It’d be nice if the upgrade of bucklescript to the OCaml 4.6 drops soon too.

Re: ReasonML: Strict, powerful and forgiving

#20
post #18
post #16

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 nothi…

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

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.

Post reply on HN