6 ms·
How did they manage to build the entire modern Web on a language without a standard library?
by bandrami 1y ago
How did they manage to build the entire modern Web on a language without a standard library?
- yen223 1y agoThe world where JavaScript has a robust standard library is one where there is only one browser vendor who gets to call all the shots regarding what the web looks like. That is not a better world.
- Y_Y 1y ago> That is not a better world. Not a better world, just the current world.
- aloha2436 1y agoSafari is too valuable of a platform for web developers to ignore, but otherwise yes it's the only real exception to the Chrome monopoly and still certainly much smaller in terms of absolute users.
- dotancohen 1y agoI use Firefox on all my devices.
- nomdep 1y agoMozilla is no longer a better actor than Google or Apple, just smaller
- cjpearson 1y agoPossibly, although the fix for this particular issue (Temporal API) is available in the current release of Firefox as well as the preview release of Safari, but it's not in that dominant browser.
- baq 1y agoActually it is. Sorry.
- h4ck_th3_pl4n3t 1y agoKind of funny that you think the open web still exists. I mean, even Microsoft gave up and just went with Chromium, and they got the definition of almost infinite resources at their disposal. Effectively if your website doesn't run in Chrome and Safari, it won't be seen by 99% of the market.
- 0points 1y ago> even Microsoft gave up Ah yes, Microsoft, the defenders of the free world.
- oarsinsync 1y ago> > even Microsoft gave up ... and they got the definition of almost infinite resources at their disposal > Ah yes, Microsoft, the defenders of the free world. No, Microsoft, one of the few businesses in the world that has both the technical ability, and the financial muscle, to be able to develop their own browser engine. Who still chose not to. Leaving us stuck in the duopoly of Apple and Google, even outside of our mobile phones.
- arcanemachiner 1y agoEmbrace Extend Enhance the world's beauty
- deleted 1y ago[deleted]
- johncoltrane 1y agoI want that world.
- Xelbair 1y agoand that differs from chrome dictating standards how? also this could've been handled easily by committee(ugh), or a 3rd party open source organization akin to linux foundation that just makes js library that all browser vendors use. Or making just a specification for JS handling things. you know - like a lot of other languages are handled, including their standard library.
- Y_Y 1y agoThere's even worse language language for this. It's absolutely essential for an modern e-commerce, but has no official standard or spec, many thousands of libraries but they're mostly poorly maintained and geoblocked. The language itself is just a hodge podge of other languages that were popular in the past, and as a result it's worse than Perl for having too many ways to do any single thing. The major dialects may be theoretically compatible, but in practice there's usually friction when you try to mix them. [Ok that's enough, ed.]
- VoidWhisperer 1y agoPHP?
- deleted 1y ago[deleted]
- omneity 1y agoWith a lot of motivation, grit, coffee and reinventing the wheel every couple of weeks.
- cjpearson 1y agoThe same way people are replacing C++ on a language without a standard library
- hnbad 1y agoBecause the alternative would have been VBScript (if Microsoft had won at the time). JS was a compromise. It had to be sent out the door quick, it needed to look sufficiently like Java to not upset Sun who were trying to establish Java as the universal platform at the time while not being feature complete enough to be perceived as a competitor rather than a supplement. And it had to be standardized ASAP to pre-empt Microsoft's Embrace Extend Extinguish strategy (which was well on its way with JScript). That's also why it's an ECMA standard rather than ISO despite Netscape not having been based in Switzerland - ECMA simply offered the shortest timeline to publishing a standard. I think what's more amazing isn't just how we managed to build the bulk of user interfaces in JavaScript but how we Node.js managed to succeed with ECMAScript 3. Node.js was born into a world without strict mode and without even built-in support for JSON: https://codelucky.com/javascript-es5/ https://codelucky.com/javascript-es5/ - and yeah, ECMAScript 3 was succeeded by ECMAScript 5 not 4 because it took vendors 10 years to agree on how the language should evolve in the 21st century - not only did we build the modern web on JavaScript, we built a lot of the modern web on the version of JavaScript as it was in 1999! Even AJAX wasn't standardized until 2006 when Web 2.0 was already in full swing.
- jasode 1y ago> on a language without a standard library? Because the other languages & with bigger runtimes and more comprehensive standard libraries such as Java applets, Microsoft Silverlight, Macromedia Flash that were promoted for browsers to create "rich fat clients" were ultimately rejected for various reasons. The plugins had performance problems, security problems, browser crashes, etc. Java applets was positioned by Sun & Netscape to be the "serious professional" language. Javascript was intended to be the "toy" language. In 1999, Microsoft added XMLHttpRequest() to IE's Javascript engine to enable Outlook-for-web email that acted dynamically like Outlook-on-desktop without page refreshes. Other browsers copied that. (We described the early "web apps" with jargon such as "DHTML" DynamicHTML and "AJAX".) In 2004, Google further proved out Javascript capabilities for "rich interactive clients" with Gmail and Google Maps. Smoothly drag map tiles around and zooming in and out without Macromedia Flash. Even without any deliberate coordinated agenda, the industry collectively begins to turn Javascript from a toy language into the dominant language for all serious web apps. Javascript now had huge momentum. A language runtime being built into the browser without a standard library like Javascript was prioritized by the industry more than the other options like plugins that had a bigger "batteries included" library. This overwhelming industry preference for Javascript happened before Node.js for server-side apps in 2009 and before Steve Jobs supposedly killed Flash in 2010. The situation today of Node.js devs using npm to download "leftpad()" and a hundred other dependencies to "fill in the gaps" of basic functionality comes from the history of Javascript's adoption.
- normie3000 1y ago> other languages & with bigger runtimes and more comprehensive standard libraries such as Java Java's Date standard lib was awful for 2 decades, so there's no guarantee that a big standard library is a good standard library.
- sethammons 1y agoEven in a good standard library, oddities arise. Many praise Go for its standard library but then there is its time format that raises an eyebrow: 01/02 03:04:05PM '06 -0700
- augusto-moura 1y agoWhat? JavaScript _has_ a standard library. And even though it has a lot of legacy baggage, it is very well defined [1] [2]. Much better defined than C, for example, where a lot of undefined behavior is given as common practice, but in reality is up to compiler implementation, and varies from architecture to architecture. JavaScript even with all its thorns, it's a very consistent ecosystem nowadays, across browsers and architectures. Being forever retro-compatible is a good thing, meaning that most code that ran during the 2000s, can still be run with minimal change. [1]: https://262.ecma-international.org/ https://262.ecma-international.org/ [2]: https://www.w3.org/TR/ https://www.w3.org/TR/
- AlienRobot 1y agoIt's called a web because of how it's held together.
- dotancohen 1y agoIt's called a web because it's full of bugs.
- bandrami 1y agoSince I'm here, one of my standard interview questions when I'm hiring is "how would you convert a Gregorian date to a Julian date?" (and I make clear there's no penalty for not knowing those terms, and explain them if needed.) What I'm looking for is "there has to be a library function for that; I would look it up".
- crubier 1y agoAn interesting related question could be: Why did all languages with standard libraries fail to become the lingua franca of the Web against JavaScript?