On Mon, Aug 11, 2014 at 6:33 PM, Domenic Denicola <[email protected]> wrote: > When I last looked at this, it seemed like a perfect use case for > [Traits](http://soft.vub.ac.be/~tvcutsem/traitsjs/tutorial.html). A > "Set-like" trait would require definitions for add, delete, and > [Symbol.iterator], but provide has, forEach, entries, keys, values, clear, > and size, plus any future interfaces. > > Then you would implement such set-likes by mixing in the set-like trait into > your prototype, which contains type-restricted definitions for add, delete, > and [Symbol.iterator] (plus probably some of the other methods for > performance reasons). > > Presumably a future version of ES that contains traits would define set-like, > map-like, and other traits that could be used.
Yes, something Trait-like would be sufficient. ~TJ _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

