Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Brendan Eich implemented the first prototype for JavaScript in 10 days

And thousands of developer years have been wasted smoothing over pre ES6 JavaScript warts.



If only we were using Java Applets or Flash ActionScript or Silverlight, all our problems would be solved.


Actually, Runescape one of the most successful MMOs ever was a Java applet. Java is much more effective at complex object-oriented modeling and an MMO is a canonical example of where OOP not only shines but is necessary. Before ES6, there were half a dozen styles of approximating classes in JavaScript, the main one being with closure-returning-functions. Even utilizing these clever tricks to make JavaScript a decent language, the runtime would not have been powerful enough to run a game like Runescape. For a very long time, JavaScript was primitive in even managing media. Flash allowed Youtube to bridge the gap of playing videos in the browser. JavaScript-based web apps to stream music didn't become prominent until the 2010s, a decade and half after JavaScript was invented. Yahoo music, the prominent web-based music player in the 2000s, used a Flash plugin. So Indeed, Flash and Java did some solve a lot of problems that JavaScript did not. JavaScript won out because it was browser-native and now WebAssembly is gaining traction because JavaScript is still not that great. TypeScript is solid, but that took years of development and Microsoft resources to launch.


Runescape was crazy for the time (pre-WoW). A full-featured MMO you could play on a wide variety of computers without downloading or installing anything. All you needed was Java.


All you needed was to download a new monthly version of 50MB of JRE and install it on your virus-prone Windows XP machine and open up about 7 new holes in your system with each patch.


You probably had the JRE installed already, unless you were particularly security-conscious. Even many who were security conscious had it installed. Runescape was also compatible with the MSJVM, though the window of time where that mattered was short.


Bear in mind you also had to update Netscape Navigator, IE, Flash and half your apps too. People didn't do it but you were supposed to.


If Java was perfect, Jagex the creator of Runescape, wouldn't have felt compelled to create its own custom scripting language, RuneScript, in 2004, which it very much did: https://web.archive.org/web/20080615044119/http://archive.th...

https://runescape.wiki/w/RuneScript

Far more apps were written in Flash than in Java Applets. Java Applets were problematic for their large file size and memory requirements. You would also need to regularly download updates for the runtime and manually run through an installer on the base operating system in order to get applets to work. They were also a security nightmare, and critical vulnerabilities continued right up until Applets were finally canned for good in 2013: https://www.cisa.gov/news-events/alerts/2013/01/10/oracle-ja...

Flash had plenty of its own vulnerabilities, but it was at least efficient for what it did with the network resources of the time.

I know the history of the web, and I know JS wasn't practical for a lot of complex apps before Chrome's v8 engine came out in 2008. That being said, it was still plenty powerful enough for apps like Gmail and Facebook.

I'm not even criticizing these technologies for existing or having been important plugins of the web at one time, I very much understand why they were used and why JS wasn't. HTML had no native video encoding, but also, the browser war held back the web standards a great deal as companies competed on the peripheral features of the web like video encoding and Silverlight vs Flash. Video codec encoding was such a mess for such a long time due to the issues with MP4 and all the patent nightmare mess that unfortunately took way longer than it should have. At least Adobe could bypass a lot of that without having to deal with the Microsoft vs Mozilla vs Apple vs Google business. And Adobe could cover the license fees for any tech it needed with its editor prices.

I get it. My point, however, is that those other technologies introduced different tradeoffs in compile time size, runtime performance, proprietary tech stack (Java is still owned by Oracle, not an open standard, to this day), mobile compatibility, etc. And none of them would have satisfied all the requirements for the web then or now. Meanwhile, since the web was able to evolve, and open standards got better and browser compatibility got better, JS is now a pretty good choice.


The idea that the creation of a game-focused scripting engine somehow reflects on the qualities of a programming language seems a bit silly (I mean this not in an insulting manner but am a bit tired and can't figure out how to structure this sentence) to me. Scripting engines show up in game engines all the time, regardless of the underlying technologies they're built on. Game-specific scripting engines allow you to have people who aren't really programmers, or programmers who aren't knowledgeable in the internals of the engine or the underlying language, to create content.


> Video codec encoding was such a mess for such a long time due to the issues with MP4 and all the patent nightmare mess that unfortunately took way longer than it should have.

Dude this isn't even wrong. It's just nonsensical and ahistorical.


Like, no, dude, it's totally sensical, historical, documented and written down for all time, part of the patent system of the United States and even if its dissatisfactional... it's actually really, truly, factual:

https://video.stackexchange.com/questions/14694/mp4-h-264-pa...

https://en.m.wikipedia.org/wiki/MPEG_LA

https://www.osnews.com/story/23299/why-flash-dissatisfies-me...


The parent issues around MPEG-4 had effectively zero influence on media tags in the HTML spec prior to HTML5. In the late 90s and the early 2000s it was the W3C's opinion that video and audio media was best left to plug-ins using an object tag. They were far more concerned about XHTML/DOM and related technologies than media support.

You're trying to draw a connection to unrelated issues. The MPEG-LA has a pretty clear licensing structure for h.264. Mobile SoCs with hardware h.264 decoders come with playback licenses just rolled into the cost of the decoder. Microsoft and Apple both shipped playback licenses. Adobe also had playback licenses for Flash because it supported h.264 in both FLV and MP4 containers. Only Firefox had any problem with h.264 licensing because they insisted on shipping their own decoder instead of just hooking into the OS' native decoder. That was a problem of their own making and was only really an issue on desktop Linux. The vast majority of people in the web have no need for concern of MPEG-LA licenses.

Even that is immaterial because the HTML5 video tag spec doesn't have a "must implement" codec specified. It readily supports references to multiple video sources based on what the browser/OS combination supports.

That still has nothing to do with issues around video delivery in browsers. Even YouTube didn't have HTML5-based playback until 2010 (for a limited amount of content). IE still had over 50% usage share of browsers so Flash-based video players were the most reliable means of video playback for most users.

Licensing of codecs just was not a limiting factor. Licensing for h.264 wasn't any more onerous than licensing for Sorensen Spark, VP6, WMV or Real Video video streaming sites were using before they started to adopt h.264.

It's fine to complain about software patents but don't conflate unrelated issues. MPEG-LA licensing didn't make the W3C ignore media playback for years. The MPEG-LA didn't affect IE's outsize influence on the web for a decade.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: