set.add and set.delete return values

Peter Michaux petermichaux at gmail.com
Mon Feb 13 21:28:10 PST 2012


The return value set.delete tells the caller if the set was modified
or not. It would be useful if the return value of set.add did the
same. For example, this way a model in MVC could efficiently know if
and notify observers that a real change to the set actually happened.

http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets

Peter


More information about the es-discuss mailing list