Comment by piskov

Comment by piskov 14 hours ago

19 replies

Genuine question: why js?

Why not something like c#: native, fast, crossplatform, strongly-typed, great tooling, supports both scripting (ie single file-based) and compiled to a binary with no dependency whatsoever (nativeAOT), great errors and error stacks, list goes on.

All great for AI to recover during its iterations of generating something useful.

Genuinely perplexed.

dolmen 14 hours ago

AI are good at JS because basically there is a ton of JS code available publicly without usage restriction: the JS code published to be executed in your browser. Most of JS code attached to web pages has no explicit license, but the implicit license is that anyone can download it and run it. Same for HTML and CSS. So using that public code to train models is a no brainer.

hexasquid 14 hours ago

If I was to pick a language, I'd pick the one all developers agree is the best.

  • nixosbestos 13 hours ago

    Ahahahahhahahahahhahahahaahaha. Please tell me this is tongue-in-cheek and just more subtle than I give HN credit for. Please.

    • morshu9001 13 hours ago

      Not all devs, not even most, but I certainly think this

mrcsharp 14 hours ago

Sadly, this will be the trend with things moving forward. JS is perceived as a good language and LLMs are meant to make them even easier to write. It is not about the mertis of a language. It's about which languages LLMs are "good" at.

jitl 10 hours ago

There’s like 100x more JS developers than C# developers. JS can also run code very quickly, where with an AOT language, you need to AOT compile it. For tool calls, eval-as-a-service, running in browser JS is far ahead of C#.

  • mrsmrtss 2 hours ago

    So, everyone who can hack some JS is now a developer? The '100x' claim is obviously exaggerated. C# is certainly one of the most used programming languages there is.

    You can run also C# code very quickly, but have the option (but not the need) to AOT compile it. I would say the only real edge JS has is the ability to run natively in the browser. It was built for that purpose, and in my opinion, that is where it should have stayed.

hoppp 14 hours ago

Because js became an everything language that everyone can write and its the only language you ever need.

I dislike it also..

morshu9001 13 hours ago

Same reason AIs also use Python and DBMSes offer JS or Py UDFs easily, interpreted languages take no build time and are more portable. JS is also very popular.

Might also be a context window thing. Idk how much boilerplate C# has, but others like Java spam it.

kuekacang 10 hours ago

One other angle yet mentioned: JS is browser native. No matter how slow it is, browser is now the LCD. Similar server-client codebase, while ugly, is another plus.

awesome_dude 14 hours ago

You could make a better argument for Go (compiles to native for multiple targets, zero actual dependencies (no need for a platform or virtual machine on the target)

  • mrcsharp 14 hours ago

    C# has AOT compilation producing native, single file assemblies. A bit behind on this compared to Go, but it's there.

  • morshu9001 13 hours ago

    Go is the most portable compiled language out there and makes a lot of compromises with the interpreted lang world. But it's got its own issues.

  • metaltyphoon 10 hours ago

    >zero actual dependencies

    on Linux only with CGO_ENABLED=0 and good luck using some non web related 3rd party module which can be used with CGO disabled.

aizk 5 hours ago

I thought c# was a dead language at this point?

  • mrsmrtss 2 hours ago

    You must have been living under a rock. C# is one of the most popular languages out there and it's better than ever.