Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, the first prototype of React was written in SML; we then moved onto OCaml.

Jordan transcribed the prototype into JS for adoption; the SML version of React, however great it might be, would have died in obscurity. The Reason project's biggest goal is to show that OCaml is actually a viable, incremental and familiar-looking choice. We've been promoting this a lot but I guess one blog post and testimonial helps way more.

There's inevitably gonna be a bit of doubt at the viability of Reason at first; but to make an argument from authority: Jordan and the team made ReactJS take off even though everyone hated it at first (browse the first HN/Reddit threads; they weren't rosy). I was there to witness it too. I'd like to say we're rather experienced at handling the social aspect required to make such project take off potentially, at least. Technically speaking, deferring to OCaml is a safe bet.

What it means for Elm/ClojureScript: https://reasonml.github.io/guide/what-and-why#dont-like-reas...

We've explicitly listed Elm & ClojureScript on our Why page as good alternatives to check. I've personally used both. The world is big enough for more of such languages.



Hold on, what's the history of react ? and why sml ? Note that I love SML, I'm just extremely surprised about the whole thing.


Honestly I believe modeling such thing in JS as an initial iteration would have drastically changed what ReactJS is today, and likely for the worse. No proof of that, aside from the fact that iterating it in SML gave the rather paradigm-shifting ReactJS we know today.

Can't speak for Jordan but I'm guessing that the answer is "it just felt right". So you can consider ReactJS as a manual program extraction from SML.

I'm not sure whether the original one was ever fully finished. I think there was a blocker from the React reconciler that SML couldn't solve in its type system? It needed GADT and existential, which is why he moved onto OCaml. Related: https://drup.github.io/2016/08/02/difflists/

So in a sense, we knew for a while now that ML would work out, somewhat demonstrated by the real-world usage of React. The technical merits are there; the social ones, definitely not. Thus Reason, which you can view as ReactJS finally going back to its root through ReasonReact, and with the social aspect properly being worked on.


Anything else that started as an sml project ? was react always a Fb project or was it a personal thing from Jordan that caught the eye of a Fb manager ?


Not that I'm aware of. Though it'll be a shame if React is a one-off. Can't comment on the rest.


Thanks nonetheless


> browse the first HN/Reddit threads; they weren't rosy

This is usually my bell weather than something’s going to be massively popular, btw.

HN/Reddit communities both have massive blinkers on and hate change. Pretty much every major advance in spaces I follow has been loathed by both.


> we're rather experienced at handling the social aspect required to make such project take off potentially

I would be really interested in hearing what you guys do in that regard. I think a lot of worthy open-source projects fail not on their merits, but for their execution of the social aspect.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: