Skip to content

Instantly share code, notes, and snippets.

@johnjbarton
johnjbarton / minimalist-classes.js
Created November 13, 2011 04:34 — forked from Gozala/minimalist-classes.js
Gonzala extend with comments
// Here is a proposal for minimalist JavaScript classes(?), that does not
// introduces any additional syntax to the language, instead it standardizes
// approach already used by majority of JS frameworks today.
// !!! What is a PROBLEM!!!
function Dog(name) {
// Classes are for creating instances, calling them without `new` changes
// behavior, which in majority cases you need to handle, so you end up with
// additional boilerplate.