Larry Wall wrote:
It seems simpler to say that one() produces bags rather than sets.
If we don't make other modifications to the language then this would mean that a
Junction is defined over a union type, "Set|Bag with additional behaviors",
depending on what operator constructed it.
Now maybe that's fine.
Or alternately, why not just redefine a Junction for consistency to say it is a
"Bag with additional behaviors" rather than a "Set with additional behaviors"?
Would doing this break anything? Do any intended uses of a Junction
specifically versus a plain Set|Bag involve asking how many instances of a value
there are, or asking how many distinct values or value instances are in the
Junction? Aside from the 3 answers: exactly none, exactly one, one or more?
What I was originally going to suggest but Tsa suggested first: Keep the
definition of a Junction as "Set with additional behaviors" but the one()
constructor just excludes values that appear multiple times in its argument
list. In other words, one() *is* the same as any() except for the added filter.
-- Darren Duncan