Skip to content
0:00 / 0:00

#douglascrockford#es6#classes

Nordic.js 2014 • Douglas Crockford - The Better Parts

Nordic.js

5.8K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • Presented by Douglas Crockford, author of JavaScript: The Good Parts
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

73K views12 years ago3 recommendations

Programming languagesSoftware designJavaScriptLanguage design and type systemsFunctional programming

Douglas Crockford argues against using classes, new, and this in JavaScript, advocating instead for classless, closure-based object composition.

The uploader added no description.

Why it's here

3 people recommend this

What people say. Recommended as a thought-provoking talk on avoiding complex JavaScript features like classes and this in favor of simpler patterns.

Moments people linked to

shkaboinkaon Hacker News • Recommends

On “WebAssembly Stack Machine”

…gratulations, 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 full and think hard about what Alan Kay & Douglass Crockford have to say about new ideas, building complex structures, and leaving something better for the next generation: link link to this video As Alan Kay states, what is simpler: something that's easier to process, but for which the software written on top of it is massive; or one that takes a bit more overhead, but allows for powerful new ways to model software and reduce complexity? I believe that an AST model is a major start in inventing "the arch" that's been missing in soft…

hrktbon Hacker News • Recommends

On ““This” in JavaScript”

…). 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, and avoiding them can reduce a lot of the complexity IMO. Some people are OK with complexity and want expressivity, I'd prefer basic and predictable easily behaviours. 0 link to this video…

Yaggoon Hacker News • Recommends

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. link to 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

u/WystanHin r/typescript • Mentions

On “Is it bad practice to use optional fields on classes?”

I tend to agree with the following from: TypeScript Deep Dive >JavaScript (and by extension TypeScript) has two bottom types : null and undefined. They are intended to mean different things: > >Something hasn't been initialized: `undefined`. > >Something is currently unavailable: `null`. Further, at the bottom of same page: >TypeScript team doesn't use `null`: TypeScript coding guidelines and it hasn't caused any problems. Douglas Crockford thinks `null`is a bad idea and we should all just use `undefined`. I've avoided null for years without any noticeable pain. Until, of course, some other library feels that null is a good idea.
25View on Reddit

u/farboxin r/typescript • Mentions

On “I've been using Typescript (migrated after 15 years of Java) for about 1.5 years. Here's what I've learned and how my programming style has changed.”

Douglas Crockford thinks null is a bad idea and we should all just use undefined. Copied from TypeScript Deep Dive
10View on Reddit

miralabson Hacker News • Mentions

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 link to this video

jonahxon Hacker News • Mentions

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: link to this video

Roboprogon Hacker News • Mentions

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): link to 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.

nooberminon Hacker News • Mentions

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 OOP0". 0 link to this video

gorkemyurton Hacker News • Mentions

On “React v15.5.0”

Douglas Crockford might have some answers for you; link to this video . It makes the developer favor inheritance over composition.

AlchemistCampon Hacker News • Mentions

On “The JavaScript Ecosystem Is Delightfully Weird”

> 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: link to this video

u/WystanHin r/typescript • Mentions

On “Nullness analysis”

I would avoid using null. Do something more idiomatic like: interface Foo { bar?: number; } const isValid = (f: Foo) => f.bar !== undefined; const foos: Foo[] = {bar: 1}, {}; console.log(foos.filter(f => isValid(f) && f.bar < 2)); Of note. >TypeScript team doesn't use null : TypeScript coding guidelines and it hasn't caused any problems. Douglas Crockford thinks null is a bad idea and we should all just use undefined. > >\-- Null vs. Undefined Also interesting is the linting rule no-null-keyword, which I always have turned on and have never suffered from.
1View on Reddit

u/WystanHin r/typescript • Mentions

On “Undefined vs null”

For reference: Null is bad From the link: > TypeScript team doesn't use null : TypeScript coding guidelines and it hasn't caused any problems. Douglas Crockford thinks null is a bad idea and we should all just use undefined. Upon reading this, ages ago, we excised null from our projects with a nice lint rule. The only time nulls ever arrive to cause pain and suffering is via JSON, where we aggressively stomp them out.
1View on Reddit