5 ms·
If you're impressed with TypeScript, you should definitely check out ReScript (formerly BuckleScript). Its type system is clean and sound, and yet compiles to n
by jey 6y ago
If you're impressed with TypeScript, you should definitely check out ReScript (formerly BuckleScript). Its type system is clean and sound, and yet compiles to native JS without overhead. https://rescript-lang.org/docs/manual/latest/introduction https://rescript-lang.org/docs/manual/latest/introduction
- phpnode 6y agoI don't think even ReScript can do this (yet?)
- nsonha 6y agogiven it's just ocaml I don't think it can do this ever, not that it's necessarily a bad thing.
- tegeek 6y agoTS compiled to JS without any "overhead". This is not what the OP said.
- cjdell 6y agoAh yes. I looked at this a while ago. I liked it but then ran into a brick wall with a lack of support for an equivalent to async/await syntax. It has wrappers for JS promises but they are clunky and awkward, unless someone wants to enlighten me?
- jey 6y agoTry this for some syntactic sugar: https://github.com/digitake/bs-promise-monad https://github.com/digitake/bs-promise-monad
- chrischen 6y agoJust want to add that the genType project can even compile ReScript to Typescript!
- nsonha 6y agodon't get your hope too high it's just the intersection between the two, advanced typescript types are lost.
- ricksharp 6y agoWow, when I read this earlier, I was dismissive (because I am really happy with typescript). But reading through the comparison - it seems to have many of the great parts I like in Typescript. Then, I noticed it has the pipe operator! I'm going to be giving this a try.
- deleted 6y ago[deleted]