Skip to content

Instantly share code, notes, and snippets.

View mattmazzola's full-sized avatar

Matt Mazzola mattmazzola

View GitHub Profile
@mattmazzola
mattmazzola / index.html
Last active August 31, 2015 06:01 — forked from mbostock/.block
Zoomable Area
<!DOCTYPE html>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<style>
svg {
font: 10px sans-serif;
}
@mattmazzola
mattmazzola / classless.md
Last active August 29, 2015 14:08 — forked from mpj/classless.md

The future is here: Classless object-oriented programming in JavaScript.

Douglas Crockford, author of JavaScript: The Good parts, recently gave a talk called The Better Parts, where he demonstrates how he creates objects in JavaScript nowadays. He doesn't call his approach anything, but I will refer to it as Crockford Classless.

Crockford Classless is completely free of class, new, this, prototype and even Crockfords own invention Object.create.

I think it's really, really sleek, and this is what it looks like:

function dog(spec) {