Settings

Theme

ReScript (previously BuckleScript and Reason)

rescript-lang.org

22 points by ccapndave 6 years ago · 14 comments

Reader

dang 6 years ago

Recent and related: https://news.ycombinator.com/item?id=24119838

smabie 6 years ago

I get that people don't like learning new and unfamiliar things, but OCaml's syntax is actually pretty nice, and the editor tooling is a lot better. ReasonML has some nice ideas like more sensible parsing of types and automatic variant to function conversions, but even so I don't think the syntax fragmentation is worth it.

I started a native ReasonML project but eventually converted the project to OCaml as I became disillusioned with the relative verbosity and noise compared to straight up OCaml.

Don't be afraid to learn something new, especially if it looks weird or inscrutable. Things are rarely weird for the sake of weirdness, and you'll expand your horizons and perspectives, eventually understanding (and maybe even liking) why things are the way they are.

This applies to functional programming, Lisp, array languages, etc. The intellectual laziness of programmers never fails to astound me. Excuses for why only the things they currently know are somehow the best. Comments like "X is the best because I don't know anything else" are so common it's sad, even among senior software engineers.

ccapndaveOP 6 years ago

I used ReasonML and Bucklescript for a self-contained part of a massive Typescript project to try it out and it was a joy. Here's hoping more people find out about it and it gets some more widespread adoption.

gdsdfe 6 years ago

I'm confused, so reasonml is now rescript?

  • ccapndaveOP 6 years ago

    ReScript is specifically ReasonML with Bucklescript, which is for transpiling down to Javascript. They also made a few minor syntax changes that make it look a bit more like Typescript.

  • iammiles 6 years ago

    I think it's just when you use ReasonML in conjunction with Bucklescript to target JS. If you're using ReasonML to compile natively then things are the same.

  • orra 6 years ago

    I'm even more confused.

    It's like all of BuckleScript and parts of ReasonML is now ReScript. Except BuckleScript has a new C-like syntax unlike the ML syntax that made BuckleScript BuckleScript as opposed to ReasonML.

    • ccapndaveOP 6 years ago

      Basically Bucklescript have forked their own (very similar) syntax from ReasonML and branded the whole syntax + Bucklescript + compiler package as ReScript. I suppose the goal is to eliminate the confusion of having so many moving parts and unify them all under a single ReScript brand.

toastal 6 years ago

Dropping the semicolons, all the brackets, and other JS-y syntax of ReasonML in favor of something more OCaml-y makes this a lot easier to read. I'm super confused at a capital U being the sigil for uncurried functions; it just is not a convention I'd expect from a modern language.

  • yawaramin 6 years ago

    It's not a sigil, it's just a naming convention. For example, in the OCaml world there's a convention for functions that throw exceptions to have a '_exn' suffix. In Haskell there's a convention for monadic function to have an 'M' suffix.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection