On 8/10/05, Dave Rolsky <[EMAIL PROTECTED]> wrote:
> [changing the subject line for the benefit of the summarizer ...]
> 
> On Wed, 10 Aug 2005, Larry Wall wrote:
> 
> > And now some people will begin to wonder how ugly set values will look.
> > We should also tell them that lists (and possibly any-junctions)
> > promote to sets in set context, so that the usual way to write a set
> > of numbers and strings can simply be
> >
> >    <1 dog 42 cat 666.5>
> 
> Groovy, but what about this?
> 
>       <1 dog 42 cat 42>
> 
> Maybe a warning with an optional fatality under "use strict 'sets'"?

I doubt that should be any kind of warning or error.  It's just that
your set will end up having four elements instead of five.  But you
really don't want to warn in this case:

    @myset (+) <1>;

By using the (+) operator (instead of the list concatenation, er,
operator?), the user is implying that he wants duplicates in @myset
thrown away.

Luke

Reply via email to