Set.prototype.toggle

Naveen Chawla naveen.chwl at gmail.com
Sun Oct 29 09:25:41 UTC 2017


"Nice to have" is good a case as any, since it applies for all features
that were ever introduced, and all that ever will be.

I'm just curious in what cases this is useful?

I'm only asking because I expect a set to represent a single condition for
entry/presence in the set e.g. "People", "Dogs", etc. I'm curious under
what circumstances the condition for entry/presence changes, that would
necessitate a "toggle"? And if that condition changes, then wouldn't that
apply across the set, necessitating a transformation to a filtered derived
set, not just for a single element? Basically, I'm interested to know, in
what circumstances are you trying to do this?

On Sun, 29 Oct 2017 at 13:37 dante federici <c.dante.federici at gmail.com>
wrote:

> What's the case for toggle other than nice to have? In general, I find
> toggle actions to be implicitly dependent on existing state -- that is,
> anywhere you have toggle you can just as easily say `add(value)` or
> `delete(value)`.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171029/633d178e/attachment.html>


More information about the es-discuss mailing list