Set constructor arguments
dean at deanlandolt.com
Tue Feb 14 12:20:51 PST 2012
On Tue, Feb 14, 2012 at 3:07 PM, Andrea Giammarchi <
andrea.giammarchi at gmail.com> wrote:
> if you accept a single argument, of course, but what if you Set(..[1, 2,
> 1]) then ?
`Set(1, 2, 1)` then? Are you suggesting this should throw? So you'd need to
dedupe your arguments before you construct a set with them? Isn't that a
primary use case of sets?
> magic add through Set constructor does not sound good to me
> On Tue, Feb 14, 2012 at 8:27 PM, Peter Michaux <petermichaux at gmail.com>wrote:
>> On Tue, Feb 14, 2012 at 12:09 AM, Andrea Giammarchi
>> <andrea.giammarchi at gmail.com> wrote:
>> > thinking about the add behavior, where no duplicated values will be
>> > this argument may cause some logic headache anyway
>> > Set([1, 2, 1]) what should happen ?
>> I think that should be a set with one element. The element is an array
>> of length three.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss