5 ms·
While it is thoughtfully designed, its type system has been designed under the severe constraint that it must be retrofittable on typical JavaScript code.
by creata 2y ago
While it is thoughtfully designed, its type system has been designed under the severe constraint that it must be retrofittable on typical JavaScript code.
- pjmlp 2y agoWhich if it was easy, instead of someone like Anders Hejlsberg leading a language design team, anyone would do it.
- creata 2y agoI didn't say it was easy. It obviously wasn't.
- josephg 2y agoYour comment doesn’t advance the conversation in any way. It just restates the claim that typescript is worse in some unspecified way. Can you give any examples of ways in which those constraints have resulted in a worse language?
- creata 2y ago> Your comment doesn’t advance the conversation in any way. That's oddly rude. I thought it might be useful to someone (not necessarily you) to bring up the fact that TypeScript is subject to a very different pressure than most other mainstream languages. That has obviously resulted in a very different type system, e.g., one with much better support for structural typing than most mainstream languages. > It just restates the claim that typescript is worse in some unspecified way. I did not "restate that claim". In fact, I was careful not to claim that TypeScript is "worse" than any other language, because that's a meaningless word without more context. > Can you give any examples of ways in which those constraints have resulted in a worse language? Again, saying that it's "worse" or "better" without context is meaningless.