DEV Community

Andrei Dascalu
Andrei Dascalu

Posted on • Updated on

Typescript vs ReasonML

A while ago I ran into this thingie: https://blog.dubenko.dev/typescript-vs-reason/

I started digging into ReasonML and found that I loved it, even more as you can do React with ReasonML.

So I wonder, given all the advantages of ReasonML, how come it's not at least as popular as Typescript?

Edit: ReasonML is supported and created by the same guy that created React.

Top comments (12)

Collapse
 
phuctm97 profile image
Minh-Phuc Tran

The ecosystem and community have always to be developed separately from the product. There’s little effort in it now for ReasonML, Elm, Elixir, etc. There gotta be someone doing that to make a great product competent in mass market.

Collapse
 
andreidascalu profile image
Andrei Dascalu

I am not entirely sure what you mean. Yes, there should always be an ecosystem and community but to which extent they must be separated from the main product it's debatable. Even for Go the core tooling and standard library are developed together with the core platform. Seems to be going well (aka core team + community support) which I guess works when you have decent money commitment behind. Same for Elixir. Not sure how things stand with ReasonML though.

Collapse
 
phuctm97 profile image
Minh-Phuc Tran

Sorry for the confusion. What I mean is to have mass adoption, there must be an advocate team dedicated to engaging with the community, talking about it, helping companies and people adopt it, otherwise it is hard to become popular.

Thread Thread
 
andreidascalu profile image
Andrei Dascalu

Oh yes, that makes sense. Definitely missing, though I also have the feeling that Typescript took off largely due to Microsoft boost rather than any organic community. Ironically, ReasonML boasts Facebook as a supporter but that goes under the radar. I would love to see the community growing, that's for sure!

Collapse
 
0916dhkim profile image
Danny Kim

I also came across ReasonML recently, and really get to like its syntax. I have yet to see the benefits of runtime type-safety (compared to type-erasure of TS), but it is undeniable that ReasonML is an interesting programming language. How was your experience with ReasonML + React?

Collapse
 
andreidascalu profile image
Andrei Dascalu • Edited

Very seamless, but I just did some basic stuff (eg, a photo management tool , just for practice). For me it was refreshing to not have to check for undefined and nulls every other line + no unexpected undefined, etc + the very concise reducers.

Collapse
 
0916dhkim profile image
Danny Kim

Awesome! I will play with reason react this weekend and see what I can get out of it. Thanks for sharing.

Collapse
 
johnkazer profile image
John Kazer

Thanks for that. I was investigating ClojureScript but reason definitely worth a look.

Maybe because it's functional and many teams not yet bought into that approach? Although lots more interest in FP now and growing I think.

Also there are a few alternatives, such as ClojureScript, Elm, purescript etc. and which to choose?

Also how is the tooling and beginner journey? ClojureScript on Windows for example is tough to set up as main official help is only Linux (that I found)

Collapse
 
andreidascalu profile image
Andrei Dascalu

What ReasonML seems to have over Elm, at least, is full interop with js ecosystem. With risks, of course.

Collapse
 
epsi profile image
E.R. Nurwijayadi

How do I setup concurrency in ReasonML 🤔?

Collapse
 
andreidascalu profile image
Andrei Dascalu

Hm, depends on what you mean. Working with async has gotten better (egghead.io/lessons/reason-async-aw...) but to go forward in ways that TypeScript and Reason can't really get to as long as they stick to running pure JS, probably ReScript can do better.

Collapse
 
epsi profile image
E.R. Nurwijayadi

Thank you for your response.