[EMAIL PROTECTED] writes: > New Revision: 13495 > doc/trunk/design/syn/S12.pod > > +In addition to C<next METHOD>, the special functions C<callsame>, > +C<callwith>, C<nextsame>, and C<nextwith> dispatch to the next > +candidate, possibly with a new argument list, and if the "next" > +variant is used, without returning: > + > + callsame; # call with the original arguments (return here) > + callwith(); # call with no arguments (return here) > + callwith(1,2,3); # call with a new set of arguments (return here) > + nextsame; # redispatch with the original arguments (no return) > + nextwith(); # redispatch with no arguments (no return) > + nextwith(1,2,3); # redispatch with a new set of arguments (no return)
So C<next> sometimes has the meaning of jumping to the next iteration of the current loop (as in Perl 5), and sometimes means to invoke a different method in place of the current one; nextsame and nextwith are related to the latter meaning. Won't that be confusing? Or hard to teach? The 'loop' use of C<next> is likely to be encountered by learning programmers far earlier than 'method' use, leaving the latter as something to trip them up when they finally meet it. Smylers