News for hackers. Stuff that matters.
Re:Rewriting TypeScript in Rust? You'D have to be by Analemma_ on Wednesday December 14, 2022 @05:22PM (#33991493)
Or more precisely, TypeScript is complicated because people insist on doing deranged things with JavaScript and its mess of a type system. TypeScript wouldn't need to contain so much complexity if the underlying JavaScript was doing simple, straightforward things. Blaming TypeScript here is kinda shooting the messenger.
Re:Rewriting TypeScript in Rust? You'D have to be by brundolf on Wednesday December 14, 2022 @05:48PM (#33991866)
It doesn't try to protect you from the really deranged things. Every TS check comes with an implied "assuming you didn't use a Proxy to make this property accessor mutate state or something"

It does reach admirably far into checking the regular dynamic-language programming patterns like using string variables to index into structures. Which is where a lot of its complexity comes from, but I wouldn't call that stuff "deranged". JS is a dynamic programming language, and people write it like a dynamic programming language, and typescript decided to meet it where it was at, which is probably the only reason it's gotten so much traction in the first place

Re:Rewriting TypeScript in Rust? You'D have to be by scotty79 on Thursday December 15, 2022 @04:29AM (#33997152)
You may not like this freedom, but I absolutely adore it. I really feel restricted when I'm writing in other languages, even dynamic ones after JS and TS shown me what should be possible.