Steffen Schwigon schrieb:
> At least the many keywords seem to be necessary to map the complexity
> of different paradigms possible in Perl6. Multimethods are not just
> overloading as in C++. Second, the different keywords declare
> different behaviour you can choose. Just read S06, it's explained
> quite understandable.

Hm, but wouldn't whose be equivalent?

  sub foo ($bar) {
    $bar.say;
  }

  multi sub foo ($bar) {
    $bar.say;
  }

Aren't subs a subset of multi subs, meaning that every sub can be
expressed as a multi sub?
Is there anything a sub has in advantage of a multi sub?
So might not just every sub be a multi sub?
If the only difference is, that you _must not_ declare a sub twice with
different argument lists, I think that this one is relatively
unimportant and letting every sub be a multi sub seems to be more
consistent to me in opposite to this arbitrary looking distinction.

Maybe I just phenomenally misunderstood multi subs, but unless I did, I
can't see why we want to have subs when we can have multi subs that can
do the same and even more.

-Thomas

Reply via email to