News for hackers. Stuff that matters.
Re:Why don't more languages offer flow typing? by noveltyaccount on Monday April 04, 2022 @01:17PM (#30909262)
I really enjoy Typescript, but every time I use it I think to myself, this would be so much better if were built on top of something other than JavaScript. Maybe AssemblyScript or some other TS to WASM target will come along with a better underlying type system and a good standard library. Dare to dream.
Re:Why don't more languages offer flow typing? by cmrdporcupine on Monday April 04, 2022 @01:30PM (#30909477)
Yep. Except that the base semantics of the language really are tuned for JavaScript. So I can't see a separation being feasible between the two.

It would have to be a new language, sharing maybe 90% of syntax etc. but differing in some places where interoperability with JS has forced compromises (base number types is one thing I can think of. I'd like separate int and floats, etc.) and, yeah, targeting WASM etc. And honestly, I'd be game for that. Esp if it came with performance advantages.

Re:Why don't more languages offer flow typing? by munificent on Monday April 04, 2022 @04:55PM (#30911831)
What you're describing is essentially the origin story for Dart.
Re:Why don't more languages offer flow typing? by noveltyaccount on Monday April 04, 2022 @01:58PM (#30909850)
Yes that's what I meant by proper type system - int, float, decimal... proper date/time/timezone support. To name a few :)
Re:Why don't more languages offer flow typing? by runald on Monday April 04, 2022 @10:44PM (#30914793)
Not quite what you are dreaming for, but there's https://typescripttolua.github.io/