5 ms·
> JavaScript has no standard library. >> Math.sin(1.57) 0.9999996829318346 This would be pretty surprising output if there were no standard library.
by thaumasiotes 4y ago
> JavaScript has no standard library.
>> Math.sin(1.57)
0.9999996829318346
This would be pretty surprising output if there were no standard library.
- accountofme 4y agoI think the gp meant standard UI library...
- thaumasiotes 4y agoThere's a standard library for that, too, but it's not exactly high-level. https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement https://developer.mozilla.org/en-US/docs/Web/API/Document/cr... At a higher level, that's pretty much what React is.
- chii 4y agoit's a bit exaggerated, but it's true that the standard built-ins for javascript is poor compared to something like java.
- thaumasiotes 4y agoThat's hard to argue with, though Java isn't known for convenient UI development either.
- crummy 4y agowhat languages are known for convenient UI development?
- Jensson 4y agoThe sum language of HTML+JS+CSS, or in other words html files. I haven't seen a better way to write UI in text files, other UI frameworks relies a lot on building the UI in some special editor or aren't easy to use.
- chii 4y agoHTML as a UI is geared towards making documents and displaying text and graphics in a rigid layout/format. It's not geared, imho, for a UI with lots of interactivity - e.g., imagine trying to implement blender or an audio processing app (like audacity) in html/css. You'd basically be creating new primitives on top of html, and build your UI on that (or install one of those UI libraries that _renders_ to html).
- tlarkworthy 4y agoSVG is part of HTML and good for most of the needs except for the audio wave stuff (which Delphi couldn't do either)
- chii 4y agowell it depends on what you mean by convenient - java's got a UI toolkit that works out of the box for all supported environments (awt), and ontop of that is built a fair number of UI frameworks like swing (which is also part of the java standard library).
- thaumasiotes 4y ago> java's got a UI toolkit that works out of the box for all supported environments That's not a useful observation; JavaScript has that too. > and ontop of that is built a fair number of UI frameworks like swing Swing is what I was thinking of; I've never gotten the impression that anyone liked it.
- deleted 4y ago[deleted]
- saghm 4y ago"No standard library" might be too strong a criticism, but "a dozen or so built-in global variables with various methods" is still probably not the user experience that most desire.
- andsoitis 4y agoWhat would you put in the JavaScript library?
- thaumasiotes 4y ago"A dozen or so built-in global variables with various methods" is exactly what a standard library is. (Well, usually it's more than 'a dozen or so'.) Generally those variables are of the "package" type, but no such type exists in JavaScript.