11 ms·
That's coming in es6
by sup 11y ago
That's coming in es6
- oldmanjay 11y agoI know people are crying out for this, but I can only shudder inside at the unholy mudball messes that will result. Inheritance is one of those things we shouldn't let anyone use until they're 40 or so.
- leonatan 11y agoOr, with great power comes great responsibility, and we shouldn't let uneducated and untrained quick-buck "developers" work on our software.
- oldmanjay 11y agoWell to be fair to myself, I was mainly making a joke. But the simple truth is that inheritance doesn't bring new power to the table, just syntax sugar, and with great sugar comes diabetes and painful death.
- EugeneOZ 11y agoClasses is a big enough portion of sugar to change expression level of code. After writing ES6 few months I don't like to write ES5 again, when I have to, and there is a lot of people who think so. Arrow functions is the another (if not first) big thing which makes this feeling stronger, and it's just a syntax sugar also. OO in ES5 looks less readable and less.. "native" than in ES6. Hope in some ES version 'this' insanity will be fixed and all will be just fine with classes. just for note: I have never used "extends" in ES6.
- Jweb_Guru 11y agoInheritance is barely ever necessary, or even important, for any software problem, real or imagined.
- hoare 11y agoim rly in love with typescript right now, looking forward to es6!
- hughw 11y agoI just had my first exposure to Typescript recently, and the only part I liked was the fact that it allowed me to mix in plain old, untyped js syntax. TS, used as TS, feels verbose, like java, with lots of extra keyboard-typing to create a simple program.
- ahoge 11y agoWith optionally typed languages like Dart and TypeScript, you only have to add types to things like fields and functions/methods to get all the tooling benefits. Type inference takes care of the rest. Secondly, you should be able to auto-complete pretty much everything.
- hughw 11y ago"you should be able to auto-complete pretty much everything" Requires tooling.
- discreteevent 11y agoEh.. grep is also a tool? Every function you write is a tool. The whole industry is built on tools and tools that make tools..
- hughw 11y agoSure. But programming languages whose claim to utility lies in an IDE -- they aren't necessarily bad, but it's not a programming language you're selling me, it's a whole environment: MS Visual Studio or whatever. A complex language requires lots of tooling like that, and a simple language doesn't. I have never missed autocompletion in Javascript, but I cannot function without IDE support in Scala. We're off the topic of OO in Javascript, but I wanted to make the point that I don't automatically consider that "IDEs can autocomplete" is a positive feature -- if you need autocomplete, that's a problem.