Le 12 sept. 2014 à 17:26, Allen Wirfs-Brock <al...@wirfs-brock.com> a écrit :
> > > Another possibility that we've considered is to tag non-auto-allocating > constructors in their declaration header For example: > > constructor() new {...} > > function foo() new {...} > > But, overall, we were trying to minimize syntactic embellishments and > bikesheding opportunities. > The visual clue may be almost already there: According to the second variant, an `extends` clause on the class indicates that there is no auto-allocation (unless the constructor is completely left out, of course). And an absence of `extends` indicates that there is auto-allocation in most cases; it just remains to force to write `Base extends Function.prototype` in the rarer case one want allocate `this` manually. — But well, it is mostly personal taste, just like the * on generator functions. —Claude _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss