At 1:34 PM +0100 12/4/06, TSa wrote:
The coolest solution would be to have Bag in a module from where it
supertypes Set when used. In this way you get the (x) to mean set
operations unless a 'use Bag' is in scope. This supertyping approach
would allow further Set supertypes like FuzzySet. But I don't know
what the syntax looks like. Also combining these Set supertype modules
might proof difficult. Once again 'FuzzySet does Set' could be more

What you mention reminds me of the "use integer" pragma of Perl 5.

BTW, are the KeyHash, KeySet and KeyBag container types forced into
hash sigiled variables? That is

  my %kh is KeyHash;
  my %ks is KeySet;
  my %kb is KeyBag;

I would expect that, like with ordinary Hashes, that I can use all of the above with $ sigiled variables (which is my preference in fact) or % sigiled variables, and the difference of semantics would be the same as with the Hash; a %foo = %bar would copy all the elements, while $foo = $bar would not.

-- Darren Duncan

Reply via email to