JavaScript is like English. It incorporates the best parts of other languages. Starting from Java, you can now see the clear influence of Python in ES6/7 with generators and string templates. I think this is JS's greatest asset.
JavaScript at 20
91–100 of 327 posts
Re: JavaScript at 20
#92Cool presentation, but holy shit, taking ~2 minutes to load on FF and freezing the browser is not.
Re: JavaScript at 20
#93I knew it!!
The Date class is/was the worst thing about the Java library. It has confused a generation of programmers about dates and time zones.
The main problem is that it's not a date, it's a time stamp.
Re: JavaScript at 20
#94Oh yeah, great, many new features. But could you please fix the damn boolean logic? And while at it, get rid of most implicit conversions. Or forget all those features and bake in a macro system, so that we can fix anything without having to wait for the next ES[N] standard to get adopted.
Last time I checked, !, && and || worked like they do in every other language.
> And while at it, get rid of most implicit conversions.
If you get rid of them JS ceases to be JS because all JS code ever written stops working, rendering the language about as useful as something I suddenly decide to create myself in 10 days.
Use TypeScript or similar if the implicit conversions bother you. You don't need to write JS directly.
> Or forget all those features and bake in a macro system, so that we can fix anything without having to wait for the next ES[N] standard to get adopted.
This was mentioned in the slides. Did you read them?
Re: JavaScript at 20
#95"Haters gonna hate." Anyone claiming that JS is the "worst thing to happen to the web" and/or that some other language would miraculously solve all of the problems present in JS should do the following, "Go create it." Don't whine about the barriers and how a new language would never be adopted because "JS is already everywhere." There are plenty of people already trying to solve this problem by actively doing someth…
There are no end of alternatives out there today, from mobile platforms to research languages exploring a myriad of aspects of computer science. Just let me know when browser vendors are going to break down the two-tiered system, and let us run the legion of alternatives alongside -- instead of under -- JavaScript. Or, they could take their own medicine, and try and write the browser in JS.
However, cries of foul "vendor lockin" erupted. So I dunno what to tell you, man.
Re: JavaScript at 20
#96Earlier quoted context omitted.
> Just let me know when browser vendors are going to break down the two-tiered system, and let us run those myriad of alternatives alongside -- instead of under -- JavaScript. The complexity of doing that would be needlessly high compared to just improving JavaScript. Having to integrate a C++ DOM with a JS DOM is hard enough. Think about how you handle cross-language cycles… > Or, they could take their own medicine,…
Works on OSes. We have a choice. In browsers, the OSes of the web, nope, just a bad language designed in 10 days that resists all attempts to make it not bad. It doesn't really matter if you like javascript, there's so many people who don't. Why do you get to dictate whether we can or can't develop on the web? You leave us with a horrible choice, use what we consider to be one of the worst modern languages, or not de…
Servers and command-line tools are an exception because your interaction with the host platform is limited to a few dozen syscalls that can be easily bound to a number of different languages. Not so with most GUI software.
Re: JavaScript at 20
#97Earlier quoted context omitted.
I think that's similar to how people say JSON was discovered by Crockford. Both only use things already present in the language, but they do form something new out of them. It is sort of a middle ground between discovery and invention.
Moreover, asm.js effectively already existed, right? It's not quite the same, but it's essentially a formalisation of what emscripten and the like already produced.
Re: JavaScript at 20
#98"Always bet on JS" is complete nonsense: http://brendaneich.github.io/ModernWeb.tw-2015/#74 It does those things poorly , and at great expense. Eich did one thing, in 10 days, that was market positioned such that it became ubiquitous, and he's been banging that drum ever since -- to everyone's detriment, given how much power over technical direction he wielded at Mozilla, and how much impact Mozilla had on the web pr…
Does it? So far it seems to be remarkably successful at these things.
Re: JavaScript at 20
#99Oh yeah, great, many new features. But could you please fix the damn boolean logic? And while at it, get rid of most implicit conversions. Or forget all those features and bake in a macro system, so that we can fix anything without having to wait for the next ES[N] standard to get adopted.
Re: JavaScript at 20
#100Eich states that in the original implementation of JS, Array was just Object with a length property. How did it handle order?
As it's just an object you can stick non-sequential-positive-integer keys on it, but that rather defeats the purpose.