5 ms·
> the browser is a bad app platform and javascript is a bad language Yeah, and we're finally making real progress towards making it better. I used to do web de
by ng12 10y ago
> the browser is a bad app platform and javascript is a bad language
Yeah, and we're finally making real progress towards making it better. I used to do web development because nobody else wanted to, now I do because it's really fun. This is a forum for hackers -- we should be excited about the unsolved problems instead of complaining that things are changing.
- kerkeslager 10y agoI'm not complaining that things are changing, I'm complaining that things are changing for the worse.
- ng12 10y agoAnd you are totally wrong about that. This is the most exciting time to be a web developer since jQuery first came out. I promise it only looks that way from the outside.
- kerkeslager 10y agoI am very much not looking at it from the outside. ES6 is a step backward. Prototypical inheritance was one of the few things Javascript had going for it, but because CS majors who only learned Java in undergrad couldn't be bothered to learn prototypical inheritance now we have two incompatible inheritance systems instead. Promises are minor syntactic sugar over callbacks which could be implemented as a library. Meanwhile `this` still doesn't mean "this", there's still no integer or boolean types, accessing a nonexistent variable silently fails but happily continues execution, only reporting an error when it's far away from the problem. There's no threading, no security primitives, and no decent debugger. None of the problems are being fixed and the new features are either lackluster or make things worse. And that's just the language itself. The ecosystem is in more of a shambles. Web development in the age of left-pad and global shared state being normal is exciting in the same sense as plagues of frogs and locusts are exciting: it's not boring but if it were boring that would be better.
- jakelazaroff 10y ago> now we have two incompatible inheritance systems instead. JavaScript still only has prototypal inheritance; class syntax is just sugar[1]. > Meanwhile `this` still doesn't mean "this" Even with arrow functions, which don't change the binding of "this"[2]? > there's still no... boolean types typeof false === "boolean" > accessing a nonexistent variable silently fails but happily continues execution Trying to access a nonexistent variable throws a ReferenceError[3]. > no decent debugger I disagree, but regardless — doesn't the fault here lie with browsers, not the language itself? We also get a module system, object and array destructuring, async/await, template strings, generators… it's pretty difficult to say the new ES features are "a step backward". [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- kerkeslager 10y ago> JavaScript still only has prototypal inheritance; class syntax is just sugar[1]. Sure, but the patterns you use with the class syntax are incompatible with the patterns you use when using object literals, so libraries pick one or the other, typically the class way. > Even with arrow functions, which don't change the binding of "this"[2]? Even with arrow functions, `function` still exists ands is more frequently used. > Trying to access a nonexistent variable throws a ReferenceError[3]. var a = {}; var b = a.c; Doesn't throw a ReferenceError for me.
- jakelazaroff 10y ago> Sure, but the patterns you use with the class syntax are incompatible with the patterns you use when using object literals How so? You can still access the prototype. It's just that the most common reason to — declaring instance methods — can be accomplished with the easier-to-read class syntax now. > Even with arrow functions, `function` still exists ands is more frequently used. ES6 is a non-breaking change. You can use arrow functions for literally every function you write other than generators. > var a = {}; > var b = a.c; That's a nonexistent property, which probably should throw some sort of error — but that's why we have tools like TypeScript and Flow that can detect this.