logoalt Hacker News

apsurdtoday at 8:11 AM1 replyview on HN

TS is very AI native to the point i'd agree it's near magical in terms of contract.

However, the fact its still the js ecosystem with react, thing is even though it's super productive in churning out the code, there's too many possible ways to do something. it's unwieldy.

For example Claude is obsessed with making react context providers. it'll make tons of them to power every feature. and your app will happily hold 20 layers of russian doll'd state in memory with no way to link to anything.

you have to tell it, no don't do that. i need you to power this thing through the router, through the url. and that has to be designed cohesively. and that's very different from the context free-for-all.


Replies

sodictoday at 1:16 PM

> TS is very AI-native, to the point I'd agree it's near magical in terms of contracts.

I agree. Not only that, I feel like TypeScript is currently the only popular high-level language with a type system capable of communicating all meaningful information. It seems to have hit an LLM sweet spot.

Looking at other candidates:

- Rust is popular and has a powerful type system, but it forces you to program at a level that's lower than necessary for most projects, hindering usability.

- Go is much more usable and very popular, but its type system can't communicate much.

- Haskell has an excellent type system, but it's nowhere near popular enough, and its usability suffers due to esoteric constraints (laziness, purity).

- etc.

I don't know the recent developments in Python's and Ruby's type systems. They may be able to compete these days, but they were nowhere near TS's level in terms of contract a few years ago when I last tried them out.

And I admittedly have no idea what's going on with C# and Java, but I'd love to hear about it.