4 ms·
Genuine question: why js? Why not something like c#: native, fast, crossplatform, strongly-typed, great tooling, supports both scripting (ie single file-based)
by piskov 11mo ago
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.
- hoppp 11mo agoBecause js became an everything language that everyone can write and its the only language you ever need. I dislike it also..
- awesome_dude 11mo agoYou 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 11mo agoC# has AOT compilation producing native, single file assemblies. A bit behind on this compared to Go, but it's there.
- piskov 11mo agoC# no longer requires .net installed or bundled inside exe. Like I’ve said: NativeAOT https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/ https://learn.microsoft.com/en-us/dotnet/core/deploying/nati...
- morshu9001 11mo agoGo 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 11mo 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.
- mrcsharp 11mo agoSadly, 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.
- hexasquid 11mo agoIf I was to pick a language, I'd pick the one all developers agree is the best.
- nixosbestos 11mo agoAhahahahhahahahahhahahahaahaha. Please tell me this is tongue-in-cheek and just more subtle than I give HN credit for. Please.
- morshu9001 11mo agoNot all devs, not even most, but I certainly think this
- dolmen 11mo agoAI 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.
- morshu9001 11mo agoSame 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.
- mokarma 11mo agoAtwood’s Law
- jitl 11mo agoThere’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 11mo agoSo, 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.
- deleted 11mo ago[deleted]
- kuekacang 11mo agoOne 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.
- aizk 11mo agoI thought c# was a dead language at this point?
- mrsmrtss 11mo agoYou must have been living under a rock. C# is one of the most popular languages out there and it's better than ever.