6 ms·
Is anyone here using Reason in any meaningful way? Even just a side project. If so, what are you using it for and how do you like it.
by ubercow 10y ago
Is anyone here using Reason in any meaningful way? Even just a side project.
If so, what are you using it for and how do you like it.
- kornish 10y agoNot using it, but jumping in to share an anecdote – I saw the Reason announcement months and months ago and decided to use it as a jumping-off point into the OCaml ecosystem. It took about a week of writing Reason before I realized I was spending so much time reading OCaml (all the libraries were written in it) before I just switched to OCaml proper. Haven't looked back - the syntax takes a few days to pick up, but is hardly the most difficult part of writing a program. Hopefully they can capitalize on the "Build" and "Share" part of their value prop [0] because "Syntax" appears (to most) to be the least valuable improvement. As a disclaimer, I could be totally wrong, never having worked at a FB-size organization – that onboarding time probably adds up quickly. Come to think of it: can anyone think of a successful transpiled language that doesn't actually provide new semantics? Coffeescript is the closest thing that comes to mind, but it's dying out as ECMAScript absorbs its most appealing features. [0]: http://facebook.github.io/reason/#reason http://facebook.github.io/reason/#reason Edit: forgot about Elixir, which seems to be doing quite well – but that introduces new semantics like homoiconicity + macros and protocols.
- cies 10y agoThere's some neat stuff in the Reason syntax, apart from the make-it-less-weird-for-those-coming-from-JS/Java/C#/etc., for instance: JSX[0] and named curried functions[1]. Both are fitting in really nice when doing FE dev't like with `react-reason`[2]. If you are interested in this, I recommend some talks. First one by Cheng Lou, a main contributor of Reason and FB employee on React Conf 2017[3]. And a talk by Sean Grove[4] on Reason in general. With the power of FB behind this new techonolgy (they have currently written 25% of messenger.com in Reason), this might well become very big. A general purpose strongly typed functional prog lang, that has a vast ecosystem, now an approachable syntax, and compiles to both native and JS. Sounds good nuh? [0]: https://facebook.github.io/reason/#diving-deeper-jsx https://facebook.github.io/reason/#diving-deeper-jsx [1]: https://facebook.github.io/reason/#diving-deeper-curried-functions https://facebook.github.io/reason/#diving-deeper-curried-fun... [2]: https://github.com/chenglou/reason-react-example/blob/master/src/todomvc/app.re https://github.com/chenglou/reason-react-example/blob/master... [3]: https://www.youtube.com/watch?v=_0T5OSSzxms https://www.youtube.com/watch?v=_0T5OSSzxms [4]: https://www.youtube.com/watch?v=8LCmLQ1-YqQ&t=517s https://www.youtube.com/watch?v=8LCmLQ1-YqQ&t=517s
- thedufer 10y agoCan you explain how named curried functions differ from ocaml's named arguments? It looks exactly the same, other than the syntax.
- chenglou 10y agoThey are the same. I don't think cies was implying they were different.
- thedufer 10y agoThe wording seems to pretty clearly say otherwise, but I appreciate the confirmation that I'm not missing anything.
- jordwalke 10y agoThey're not different than OCaml's, but Reason's JSX is an interesting / useful application of labeled arguments that appeals to React developers.
- cies 10y agoMy bad. They're the same (as others noted). Was not familiar with them.
- mirekrusin 10y ago> (...) Coffeescript is the closest thing that comes to mind, but it's dying out as ECMAScript absorbs its most appealing features. (...) CoffeeScript seems to be doing well, they're working on version 2.0 (currently in alpha) aka coffeescript@next [1] with async/await (with similar approach as they did with generators where only `yield` keyword is used and the function is implicitly lifted to generator, similarly using `await` implicitly lifts function to async, so there's no need to mark function as async explicitly - very good idea IMHO), ES2015 classes and some other changes. CoffeeScript is still what it was before - making code easier and more pleasurable to read and write: less verbose, everything is an expression, existential operator, better switch, comprehensions, prototype access operator, chained comparisons, block regex, implicit returns, range loops... [1] http://coffeescript.org/v2/ http://coffeescript.org/v2/
- jordwalke 10y agoAlso note that there are some language features which are surprisingly syntactic - which are well within the scope of Reason : For example, some basic facilities for export/import as well as async transformations. These are all being discussed/proposed in the Reason channel, and they can be implemented in an opinionated syntax without needing to fragment the OCaml ecosystem - providing full interop between existing OCaml packages / tools. Once/if a build system is standardized in the OCaml community, there are even more interesting features and tools that can be built, and can be given first class syntactic treatment from within Reason.
- chenglou 10y agoI work alongside the Reason team. We're using it on messenger.com. 25% converted over already. 4 bugs during conversion, and only a single runtime bug in the converted part since last half.
- zem 10y agomessenger.com is written in ocaml? that's pretty neat!
- chenglou 10y agoConverted. From reactjs to reason-react https://github.com/reasonml/reason-react https://github.com/reasonml/reason-react Which imo is a bigger achievement! Being able to gradually convert a js codebase over is one of our main goals.
- zem 10y agoindeed! i would love to read a blog post about the conversion.
- Touche 10y agoThe front-end or back-end? The front-end isn't what I would call an endorsement of whatever framework/language is chosen.
- 10y ago
- 49531 10y agomessenger.com is 25% Reason
- tyoverby 10y agoI tried using Reason for a side project. Getting the build tools and the package manager for ocaml took too long so I gave up.
- chenglou 10y agoIf you're still willing to give it a second chance, we've got https://github.com/chenglou/reason-react-example https://github.com/chenglou/reason-react-example which uses only npm Sorry for the crappy initial experience.
- tyoverby 10y agoI did see that, but I discounted it because I wanted to make a serverside (native, not serverside-js) application, and I assumed that the reason-react-example was only for making compile-to-javascript applications.
- tekknolagi 10y agoIf you'd like, I can help you get set up on Discord: http://discord.gg/reasonml http://discord.gg/reasonml
- jordwalke 10y agoJust so we don't miss the opportunity to learn - would you mind stating what you would find valuable in a toolchain for building a server side native system? What kind of things about project management/install appeal to you?