Nordic.js 2014 • Douglas Crockford - The Better Parts

Channel:Nordic.js · Length:33:52 · Published:2014-10-06 · Views:73306

Watch on YouTube

Summary

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.

Why HN recommends it

HN commenters cite it whenever JavaScript classes, `this` or inheritance come up, as the clearest case for classless OOP from Crockford.

It's possible to write javascript without `this`, a style preferred e.g. by Douglas Crockford, explained in the video below. — HN, 2017

Programming language design · Web development · Software architecture & design

Subtitles (excerpt)

okay so now the part you've all been waiting for the better part so um currently the standard for JavaScript is es5 which was published late in 2009 and since then JavaScript has gone on to become one of the world's most important programming languages there's a new edition which is supposed to come out next year I hope it does and it will contain some new good parts and some new bad parts and I I want to share some of this with you so first the good parts we're going to get proper tail calls tail calls is a badly named feature the name comes from lisp but what it means is that if the last thing a function does is return the result of calling another function then the compiler optimizes that so instead of doing a call return sequence it can do a jump which is much faster uses memory at a much slower rate enable whole new kinds of programming with this feature JavaScript becomes a real functional programming language which will be great this is this will be my most favorite feature in es6 uh next is Ellipsis dot dot dot also known as the rest operator or the spread operator which replaces the arguments array becomes the best way for writing functions that deal with a variable number of arguments so in an argument list dot dot dot variable name or parameter

On Hacker News

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 fore… — shkaboinka, 2016-11
It's possible to write javascript without `this`, a style preferred e.g. by Douglas Crockford, explained in the video below. [VIDEO] I've also started to write my code mostly without `this`, `class` or `new`, not looking back. Another related, highly recommend reading: [LINK] — Yaggo, 2017-08
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 th… — hrktb, 2014-12
> Less that 10 years ago, JavaScript sucked bad. It had no imports, no classes, no async, no arrow functions No classes in JS was much better than with. As someone who used and contributed to CoffeeScript, I was initially excited by them but in retrospect, they've been a huge negative IMO. Douglas Crockford saw it immediately: [VIDEO] — AlchemistCamp, 2023-05
Douglas Crockford might have some answers for you; [VIDEO] . It makes the developer favor inheritance over composition. — gorkemyurt, 2017-04

Related videos