1,295 karma · joined March 19, 2013
Anyways, since I'm basically doing Reason 24/7 I kinda consider myself to be on the team.
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.
It scales easier to settle the debate by just fulfilling the demand rather than encountering each such argument and spend literally years debating about them.
Reason's open-source, as well as ReasonReact(https://github.com/reasonml/reason-react). Using BuckleScript the OCaml-to-JS compiler, we compile to normal JS code with minimal runtime.
Here's why we made it: https://reasonml.github.io/guide/what-and-why
From what I know, there are at least three classes in some universities (forgot the names) whose professors/TAs told me they were teaching Reason to decent success. Reason's also used in this users study: https://arxiv.org/pdf/1708.07583.pdf. Reason removes the unfamiliarity part in order for them to get to the core of the research, which is still done in OCaml.
Don't lose hope! =)
Happy to discuss that other blog post somewhere else (discord.gg/reasonml)
* Having a different syntax isn't without cost for the existing OCaml community, but so far most have been very supportive
Not sure how much I can say, but the leak is somewhere in the subscriptions, which isn't in Reason. Ironically the goal is to convert that section to Reason so that refactoring can finally be done (I've left that part out of the blog post just in case). Messenger produced the grandfather of Flux; it's not the easiest thing to refactor.
With that kind of exposure comes some pretty negative snarks & unrelated criticisms that are hard to counter in a post/tweet. I've left a few replies on this thread but I'll still try my best to answer the questions here =) (but before that, please do give https://reasonml.github.io/guide/what-and-why a look).
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.
Btw, for more justification on the syntax change, I've written a short answer here: https://www.reddit.com/r/reasonml/comments/6v2olv/new_syntax...
BAM, autocomplete menu in your shell.
The setup isn't straightforward; I've written a small guide here: https://gist.github.com/chenglou/03505022bc4598fcb80e523f868...
I struggled with git when I first used it. But when you have an autocomplete menu giving you the right commands and sub-commands at each turn it's pretty hard _not_ to learn git (the default porcelain anyway).
Seriously, why am I defending a good autocomplete in the shell, go try it =)
We're just a syntax for OCaml; we don't change how it runs. Same GC. Reason's mMuch less sophisticated than you think, but also much fewer unknowns. https://reasonml.github.io/try/
The goal of Reason (and of BuckleScript) is so that people can convince their coworkers that OCaml isn't an esoteric unmaintainable language. BuckleScript is JavaScript: The Good Parts: The Good Parts.
2. Also, speaking of native compilation: we're not reference counting but _some_ predictability when working with UI code is needed. The GC has to be fast and collect things within 16ms (and now, 8ms since iPad Pro is often 120fps). The ocaml gc achieves that.
Those aren't my findings: those are the findings of the creator of React, who also created Reason.
3. Finally, and to corroborate with what we wrote on that page: if you go ask your "normal JS colleagues", you'll realize most folks don't _actually_ know the semantics of JS. They like JS because it _looks_ familiar. Is TypeScript "just JavaScript"? Does it matter if JS folks can pick it up and be equally productive quickly? OCaml/BS semantics map over to JS well enough that we can just change the syntax into something familiar, and you'd likey end up writing the code you'd usually write in JS, albeit backed by a type system that needs to make no excuse in terms of quality.
Hope that helps? Tell me if that makes sense.
(Tail recursion has been a problem for a single person so far afaik; you do have imperative loops)
If you have some time, please give that intro page a read. Hopefully that intro page explains what we're achieving. If you'd like more nuanced opinions, we're always in Discord (discord.gg/reasonml).
Hope to see you around =)
I personally work on it too and have been using it on messenger.com
More philosophically speaking, if there's an equation of life with all the variables and we apply it here by taking all the "saved effort thanks to not promoting water consciousness in regular households" and dumping it into whichever area we'd think is ideally efficient, it wouldn't be _too_ surprising if holistically, the result comes out less favorable of this approach vs just telling regular folks to save water. For example, consider that it might take tenfold the effort to convince an agricultural company CEO to change approach; if ninefold the effort doesn't reach the activation energy to convince such person then you're better off telling nine people to stop the waste.
In general, I have the feeling that many decisions can wrongly be made to look stupid if we recalculate it using the select few variables we care about.
Is there any similar build system? I know of https://github.com/droundy/fac, but it's not cross-platform
You can also check the community's work: https://reasonml.github.io/community/
(And then there's https://reasonml.github.io, which I work on)