4 ms·
I'm on the Facebook Reason team, and we're using BuckleScript to compile OCaml into the best compiler output I've ever seen. People didn't recognize that my Rea
by chenglou 10y ago
I'm on the Facebook Reason team, and we're using BuckleScript to compile OCaml into the best compiler output I've ever seen. People didn't recognize that my React components were generated, not hand-written.
BuckleScript's author (hongbo_zhang here) has been incredibly responsive and welcoming.
We'll be publishing the React.js binding on HN in a few days. Stay tuned! We (including Hongbo) are all sitting in irc #reasonml and https://gitter.im/facebook/reason https://gitter.im/facebook/reason
- agrafix 10y agoPretty cool that BuckleScript works with Reason! :-)
- deleted 10y ago[deleted]
- danielmason 10y agoReason describes itself as "a meta language toolchain to build systems rapidly", which seems a little vague to me. Am I understanding correctly that Reason is both a (kind of) alternative compiler for OCaml's build toolchain, and a dialect of OCaml in its own right? To tie this back to Bucklescript, does this loosely describe the process of using Reason syntax to author Javascript? Reason file -> (Reason) -> OCaml executable code -> (Bucklescript) -> Javascript
- sgrove 10y agoIf you'll forgive the shameless plug, I talked a bit about ReasonML here, hopefully it helps clear things up https://youtu.be/QWfHrbSqnB0?t=29m34s https://youtu.be/QWfHrbSqnB0?t=29m34s Basically, just a new syntax and a blessed-stack approach that really, really emphasizes developer experience. Which is to say, ReasonML is merely a cosmetic and DX change, it remains compatible and is not a fork of OCaml at all.
- danielmason 10y agoThanks, that's very helpful!
- chenglou 10y agoThink Elixir for Erlang. Currently it's a syntax on top of OCaml. But we'd like to polish the OCaml ecosystem tooling too; we're calling the umbrella project "Reason".
- swuecho 10y agoThat will be great. Ocaml is great language, but not that user friendly. Elixir is pretty mature nowadays. Reason still have a long way to go. Hope that will happen.
- jonahx 10y ago> Currently it's a syntax on top of OCaml. Does this just mean it compiles to OCaml?
- chenglou 10y agoThere's a crucial distinction! OCaml's compilation command takes in a `-pp` flag (preprocessor), which accepts a command that takes in a file and outputs an OCaml AST tree. We're basically using that. In that sense, the official OCaml syntax is really just that: another syntax like Reason, but official, and goes back two decades. Because of the clean mapping from one syntax to another, you can toggle between the two fairly easily: https://github.com/facebook/reason/wiki/Newcomer-Tips-&-Tricks#ocaml---reason-conversion-tricks https://github.com/facebook/reason/wiki/Newcomer-Tips-&-Tric...
- jonahx 10y agoInteresting. Thanks for explaining that.
- eric_bullington 10y ago> We'll be publishing the React.js binding on HN in a few days. Sounds great. Will this be announced on any email list I could subscribe to? Thanks!
- chenglou 10y agoNo email list for now. We'll be active in the chat rooms and HN though.
- learningman 10y agoWill you integrate with React Native?