in reply to Re^6: Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
in thread Replaying Santa Claus Golf Apocalypse with Pugs/Perl6
Parallel dispatch
Any of the method call forms may be turned into a hyperoperator by treating the method call as a postfix:
@object».meth(@args) # calls one method on each @object».?meth(@args) # calls method if there is one on each @object».*meth(@args) # calls all methods (0 or more) on each @object».+meth(@args) # calls all methods (1 or more) on each @object».=meth(@args) # calls mutator method on each @object».:meth(@args) # calls private method on each
Pretty nice, I think. Is there any other programming language that allows anything similar to Perl 6 parallel dispatch?
rg0now
|
|---|