Re:CoffeeScript for TypeScript
by giraffe_lady on Monday February 27, 2023 @05:51PM
(#34963126)
please just use rescript it addresses every problem with js/ts and is simpler and you get a sound type system please.
[ Parent
| on HN ]
Re:CoffeeScript for TypeScript
by 0x62c1b43e on Monday February 27, 2023 @05:58PM
(#34963200)
The compilation speed of ReScript is also great
I took a look at rescript's facillities for migration from JS and at step 1 (https://rescript-lang.org/docs/manual/latest/converting-from...), it tells you:
> First, copy the entire file content over to a new file called src/Main.res by using our %%raw JS embedding trick: > %%raw(`const school = require('school'); etc. `)
I stopped reading there - I'm sorry but that is horrifying. Wrapping JS in in a big backtick string?! No. That's even worse that Dart-JS interop.
Re:CoffeeScript for TypeScript
by Throw999999 on Monday February 27, 2023 @08:56PM
(#34964712)
That is not how you normally do interop in Rescript.
Re:CoffeeScript for TypeScript
by giraffe_lady on Tuesday February 28, 2023 @09:34AM
(#34969704)
ok