Skip to content

Instantly share code, notes, and snippets.

View irisfofs's full-sized avatar

Iris irisfofs

View GitHub Profile
@ewinslow
ewinslow / classes.md
Last active January 24, 2018 04:03
How I wish ES6 classes were implemented

Introduction

ES6 classes are happening, and there's no way the syntax is going to change radically just for me this late in the game, but I still figure what the heck. Maybe I can write a language someday that has this feature. Or maybe I'm wrong and the feature can change with enough motivation...

Background

The main premise of the currently accepted syntax is to be simple sugar over the prototype style of class definitions:

function Foo() {