apparently there is an ecmascript proposal for this syntax: class Foo { a = 1; } which would assign `this.a = 1` on every /instance/, rather than the prototype. unsure how i feel about this. also adds private fields, which i feel very strongly Is Bad https://github.com/tc39/proposal-class-fields …
-
-
brackets mean "evaluate this expression and use the result as an identifier here". you can already do it with function definitions; it's especially useful if you want to use a Symbol as a name
-
Maybe I'm just a dinosaur, but `this[Symbol.iterator] = function() {... }` seemed fine
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.