Hacker News new | past | comments | ask | show | jobs | submit login

I've heard that Reason is essentially what Jordan Walke (React creator) was trying to make with React. Maybe that's wrong, but he's the head of this project and it looks great. Also props to FB engineering for having faith in him with React and this.

Wondering if Reason will take off and what it will mean for languages like Elm or ClojureScript.




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.


I think ClojureScript's growth won't be impacted. Those folks do their own thing. There's a lot of innovative stuff in that community. Particularly fascinating watching the alternative approach to building good software by intentionally pursuing means other than static typing. That said, I tend to be on the static side of spectrum. There's a good amount of overlap between Reason and Elm. Elm may have a wider scope, is built for apps specifically, which I love. On the other hand, Reason is OCaml and OCaml is OCaml, which is great. Exciting times.


You mean Elm may have a narrower scope, right?


Nope I meant wider, with respect to what responsibilities they take on. Elm does more stuff. It's a language and framework/architecture for building apps. Reason is just a language, though with a more powerful type system, which perhaps is what you meant. Unlike Elm, it's meant to be paired with React or other frameworks to get the job done. It has a narrower scope because it does less stuff.


Elm has limited itself only to the scope of building applications in the browser; therefore, it's scope is much narrower. A general purpose language aims to be ergonomic for most use cases, which means supporting constructs that may not be necessary for e.g. front end development, but may be a huge quality of life enhancer for server side applications, hardware, etc.

It needs to be powerful and flexible enough to allow things like React or other frameworks to be built in it. Elm has only the Elm way, nothing more.


Perhaps scope wasn't the right word. I think we agree. If Reason is to be considered a general purpose language, then Elm is DSL for web apps. In that domain, it tries to be all you need, which is what my context of scope was. Reason is more suitable for probably all other domains.


Oh, I see. Yes, I was thinking more in language terms.




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

Search: