5 ms·
JS, too, right? Forget "large" standard library, there really isn't any standard library at all
by saghm 10y ago
JS, too, right? Forget "large" standard library, there really isn't any standard library at all
- brandonbloom 10y agoYou don't consider the dynamic, rich document presentation engine that is HTML to be a standard "library"? Seems like it is to me.
- kibwen 10y agoHTML doesn't do anything for JS other than provide a way to create visual interfaces. It might be comparable to the role that `tkinter` plays for Python's stdlib, but HTML alone is emphatically not a standard library.
- brandonbloom 10y agoMy point is that most languages are totally useless on their own. JavaScript the _language_ doesn't offer any FFI or other mechanism to call outside services. Without a browser or something like Node's libuv, JavaScript wouldn't be useful at all. The capabilities provided in the box are part of the language in terms of what actually matters in motivating people to choose to use the language, no matter what form those capabilities come in.
- tibbe 10y agoYou don't need a standard library to win if you don't have any competitors (in the browser). :) Fitness for purpose is relative to the other options.
- saghm 10y agoWell, JS was originally competing with Java applets in the browser, but, like you said, fitness for purpose is pretty significant! My point (or rather, the point of the parent comment that I'm agreeing with) there's a lot more than just the presence and characteristics of a standard library that determine how widespread a language becomes
- Touche 10y agoThat's overly dismissive, Node.js has the same issue as JS in the browser and does very well. Small core doesn't matter there.
- hibbelig 10y agoYou have these built-in objects like Math and String and Array. Are those not the standard library?
- saghm 10y agoI'm not sure I'd classify them as a standard library; they're essentially just pervasive global variables. For a comparison, think of Java; the standard library is things like `java.util` and `java.swing`, which goes far beyond having the `System` and `Math` classes available in `java.lang`.