News for hackers. Stuff that matters.
[dead]
Re:Javascript is a buffet, not the enemy [video] by virmundi on Friday April 28, 2017 @10:21PM (#14224687)
I agree with you fully. I even started to write a book on it [1]. Unfortunately there is nothing else.

When I was a young man, I had IE as the primary target. I could chose between screwy looking Javascript that wasn't fully supported across the fledgling NS/IE browsers, or VBScript, which wasn't supported at all on NS, but did just fine on IE. Since IE was huge, I learned VBScript because it took my BASIC skills, which were basic, to the next level.

VBScript quickly fell away even though I was able to do neat demos that were cutting edge such as adding fog lamps to a car to get a quote when buying a new car (or changing the color). It fell because MS didn't make VBScript available as a common standard so Mozilla didn't implement it. By the time Chrome came along, it was a dead language like Phoenician.

All that said to bring home the point: there is nothing else. Shit is shit, but at least like shit you can generate energy with JS. You can make the page move. You can seamlessly update sections with new data. It is the only thing than brings a spirit to a page. This is what either the users or the developers want (within reason, which is different for both of those markets).

Even with WebAssembly we will probably stay on JS for years to come. Each browser has to implement support for a new language as well as stay standardize compliant with JS. I doubt will see multiple languages equally supported.

It's a huge turd. It's a huge turd that gets things done. It's essentially both the ball and the beetle. Simply screaming into the void won't help anything [2].

1 - https://github.com/virmundi/JSIsGarbage 2 - http://screamintothevoid.com

Re:Javascript is a buffet, not the enemy [video] by jasonkostempski on Friday April 28, 2017 @09:12PM (#14224414)
JavaScript is fine as a language. However, if it had never been allowed to run without user consent, it wouldn't be such a scourge as there would be minimal ads, minimal cross-site tracking and most sites wouldn't be able to justify a user prompt just to enable a useless animation.
Re:Javascript is a buffet, not the enemy [video] by Pharylon on Friday April 28, 2017 @10:08PM (#14224644)
JavaScript is a deeply flawed language. It has both undefined and null. You almost never use the == operator... except as a workaround to easily check if something is either null or undefined.

That being said, modern JavaScript is actually pretty nice, once you know where the pitfalls are.

But if JavaScript wasn't allowed to run by default, it would have never reached it's current level. It'd still be a deeply flawed toy scripting language.

Re:Javascript is a buffet, not the enemy [video] by jasonkostempski on Friday April 28, 2017 @10:48PM (#14224769)
"But if JavaScript wasn't allowed to run by default, it would have never reached it's current level."

I was thinking about that too but I'm not sure it's true. There are some real universally useful applications (e.g. maps; office suites; email; heck, even social media) that require some code to function and I think just about everyone would have been OK with having to grant permissions one time to use them. And all the companies currently making those types of applications helped make JS what it is. Although the most prominent one is the one that has made all it's money on ads and tracking so maybe that's not such a good argument. Anyway, now that we have JS in its current state, maybe we could think about starting to prompt by default, starting with JS from external domains :) (I know, fat chance).

Re:Javascript is a buffet, not the enemy [video] by jack9 on Saturday April 29, 2017 @02:12AM (#14225293)
I think you aren't quite understanding the point. It's not that some language wouldn't have dominated (in the interest of interoperability and functionality needs), but that it probably would have been a product by MS or some other homebrew language. Javascript being codified with the hackneyed ecmascript standard, was the death nell for efficiency in web apps for the last few decades. Without the standard, we probably would have seen a shift to other technologies (some of which would have failed like Silverlight) on emerging browsers, in hindsight.
Re:Javascript is a buffet, not the enemy [video] by sctb on Sunday April 30, 2017 @02:45PM (#14233166)
Please post civilly and substantively on Hacker News:

https://news.ycombinator.com/newsguidelines.html