Douglas Crockford
"The Better Parts" (2014)
https://vimeo.com/97419177
https://www.youtube.com/watch?v=bo36MrBfTk4
- Proper tail calls
- Splat operator (rest and spread)
- Modules
- Let keyword / block scope
- ?
- Classes
- ?
-
stopped using loops
array.forEach and array.map instead of for
Object.keys instead of for...in
ES6: recursion instead of while -
stopped using Object.create()
stopped using the "this" keyword
function constructor(specObj) {
var that = other_constructor(specObj),
member,
method = function() {
// specObj, member, method
};
that.publicMethod = method;
return that;
}
- An applications language
- No bad parts
- Decimal floating point
- Actor model instead of objects?
Maybe not. One more OO language first. - Prototypal > classical
No premature taxonomy creation - Class-free > prototypal
Pros of prototypes: memory conservation (irrelevant today)
Cons: Retroactive heredity (change an object after it's created)
Here's the number type he proposes: http://dec64.com/