Comment by overgard

1 day ago

I think that typescript is a language uniquely suited to LLMs though:

  - It's garbage collected, so variable lifetimes don't need to be traced
  - It's structurally typed, so LLMs can get away with duplicating types as long as the shape fits. 
  - The type system has an escape hatch (any or unknown)
  - It produces nice stack traces
  - The industry has more or less settled styling issues (ie, most typescript looks pretty uniform stylistically).
  - There is an insane amount of open source code to train on
  - Even "compiled" code is somewhat easy(er) to deobfuscate and read (because you're compiling JS to JS)

Contrast that with C/C++:

  - Memory management is important, and tricky
  - Segfaults give you hardly anything to work with
  - There are like a thousand different coding styles
  - Nobody can agree on the proper subset of the language to use (ie, exceptions allowed or not allowed, macros, etc.)
  - Security issues are very much magnified (and they're   already a huge problem in vibecoded typescript)
  - The use cases are a lot more diverse. IE, if you're using typescript you're probably either writing a web page or a server (maybe a command line app). (I'm lumping electron in here, because it's still a web page and a server). C is used for operating systems, games, large hero apps, anything CPU or memory constrained, etc.

I'm not sure I agree that typescript is "90% of all software". I think it's 90% of what people on hacker news use. I think devs in different domains always overestimate the importance of their specific domain and underestimate the importance of other domains.

I wouldn't say TypeScript is 90% of all software exactly, but tons of apps on all kinds of technologies like Python / Django, Ruby on Rails, PHP, Wordpress, "enterprise" Java and the like, primarily doing CRUD and data plumbing especially for niche applications and internal LoB sites that we never see on the open Internet.

I agree C++ is harder, and I still occassionally find a missing free(), but Codex did crack my problem... including fixing a segfault! I had a bunch of strategically placed printfs gated behind an environment variable, it found those, added its own, set the environment variable, and examined the outputs to debug the issue.

I cannot emphasize how mindblowing this is, because years back I had spent an hour+ doing the same thing unsuccessfully before being pulled away.