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) {

multi sub foo ($bar) {

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.


Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 10 of 14 | next ›
Discussion Overview
groupperl6-users @
postedJun 21, '06 at 2:41p
activeJun 28, '06 at 2:20a



site design / logo © 2021 Grokbase