Nordic.js 2014 • Douglas Crockford - The Better Parts
Why Hacker News recommends it
HN commenters cite it whenever JavaScript classes, `this` or inheritance come up, as the clearest case for classless OOP from Crockford.
What it is
Douglas Crockford's Nordic.js 2014 talk on 'the better parts' of JavaScript and programming in general. He argues against `this`, `new` and ES6 classes, and for classless, composition-based object patterns, with some broader remarks on building better structures for the future.
Recommended by 3 HN commenters across 3 different months, 2014 to 2023.
What Hacker News said
Strong rec shkaboinka · 2016-11 · on “WebAssembly Stack Machine”
I believe that switching to a stack machine is short-sighted and a big mistake: The AST format could open up new possibilities for software, some of which are observable in Lispy languages like Scheme (I won't list them here). Instead, we're looking at locking the software world back into this 1960's model for another 50 years out of a misguided concern for optimization over power. It's like foregoing the arch because it's more work to craft, and instead coming up with a REALLY efficient way to fit square blocks together. Congratulations, we can build better pyramids, but will never grasp the concept of a cathedral. To really grasp my point, I BEG you all to watch the following two videos in
Recommends hrktb · 2014-12 · on ““This” in JavaScript”
I don't think a project is "wrong" if it is working. Also these a just opinions, but I think it's counterproductive. I feel it's the same as class systems with inheritance and lots of OO properties implemented. It's not wrong, but it's so much overhead, so easy to shoot one's foot, for so few returns. And there's a class syntax coming to ES6, so I'm clearly in the minority. For a discussion on the "this" use, there is an interesting talk[0] by D.Crockford on the subject, at about 8 min in (but I'd watch the whole thing). I don't agree with everything he is advising, but I think he has pretty compelling arguments overall. There's a lot of things in js that are not necessary to write good code
Recommends Yaggo · 2017-08 · on “‘This’ in JavaScript”
It's possible to write javascript without `this`, a style preferred e.g. by Douglas Crockford, explained in the video below. [this video] I've also started to write my code mostly without `this`, `class` or `new`, not looking back. Another related, highly recommend reading: [LINK]
Cites miralabs · 2015-04 · on “FOAM: New JavaScript Framework by Google Engineers”
Crockford talks about the bad features added to ES6, one of them class which he said is most requested by Java developers programming javascript.At the end of the talk he show way how to move out of classes/new in javascript [this video]
Cites jonahx · 2015-07 · on “ES6 in Depth: Classes”
Douglas Crockford says that classes were the single worst mistake in es6. So it's not really a face palm: [this video]
Cites Roboprog · 2015-12 · on “Microsoft Edge's JavaScript engine to go open-source”
"Those people will go to their graves, never knowing how miserable they are" :-) See 5:30 into video (on ES6): [this video] I have been doing a fair amount of JS work in an app using Angular this year. I don't use much inheritance of any kind, mostly FP techniques and "objects" (associative arrays) as aggregates. If you use "closure" variables instead of "this", it's pretty easy to graft functions from one aggregate to another for code reuse.
Cites noobermin · 2016-06 · on “Alan Kay has agreed to do an AMA today”
It seems that dynamic or at least sloppily typed langauges like javascript and python have become more and more popular. Do you think typeless/dynamic languages are the future? I personally really like "classless OOP[0]". [0] [this video]
Cites gorkemyurt · 2017-04 · on “React v15.5.0”
Douglas Crockford might have some answers for you; [this video] . It makes the developer favor inheritance over composition.