4 ms·
JavaScript has a very weak standard library. The language & standard library lacks essentials like structural equality, until 2015 or so very weak class-based o
by jitl 4y ago
JavaScript has a very weak standard library. The language & standard library lacks essentials like structural equality, until 2015 or so very weak class-based object-oriented programming, and to this day has numerous footguns that are tricky to remove without breaking the web, like `==`, `this` scoping, and Array.prototype.sort() being in-place.
JavaScript is turning complete and I prefer it’s semantics to the lawless land of Perl, but it ultimately does not serve its users as a general purpose programming language for getting things done - it serves the web foremost, and as a distant second there’s specialized programming environments like Node and Bun with priorities like “asynchronous” that struggle with POSIX/system scripting basics like fork(2), execve(2), working with files in simple ways. Don’t even get me started on FFI/calling into dynamic libraries, which is the bread and butter of scientific computing. FFI is in the stdlib in Ruby; but requires writing or compiling C++ for Node, or a monstrous stack of compilers for the web.
JavaScript is interesting because there are so many healthy alternative runtimes, but when it comes to getting things done with data, both Python and Ruby are much more straightforward and prioritize developer happiness & utility, instead of standardized web compatibility.
- yellowapple 4y ago> Don’t even get me started on FFI/calling into dynamic libraries, which is the bread and butter of scientific computing. Which is, incidentally, one of the things Bun provides. Like you said: there are indeed healthy alternative runtimes. Said runtimes can (and often do) readily provide a richer standard library, or break web compatibility to resolve footguns, or what have you. Bun seems to be making good progress to that effect, and my point in the previous comment presupposes that it succeeds.
- jitl 4y agoI haven’t seen any runtime fix/add structural equality, array methods, or this scope