develooper Front page | perl.perl6.language | Postings from April 2003

Anonymous Multimethods

From:
Dave Whipp
Date:
April 16, 2003 20:25
Subject:
Anonymous Multimethods
Message ID:
20030417032536.23302.qmail@onion.perl.org
In another post I tried to define anonymous multimethods: is this valid?

   $multi = multi (Foo $foo: Int $i) {...}
          | multi (Bar $bar) {...};

   $multi(Foo.new, 7);
   $multi(Bar.new);

Should I be using an injunction instead of a disjunction?

What would be the semantics of calling a junction of anonymous C<sub>s? 
Does it spawn multiple threads?


Dave.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About