Mark Stosberg wrote: > S12 describes a feature to call sets of methods at the same time: > > http://feather.perl6.nl/syn/S12.html#Calling_sets_of_methods > > I would like the spec to clarify what happens to the return values of > all these methods. > > I'm fine with a simple answer, such as that they are not available, or > only the first or last set of return values is returned. > > As a "use case", we may use of basically this feature in > CGI::Application in Perl5, as part the plugin system. Each plugin > location is like a method name, and as we get to each point in the code, > we look up through the inheritance tree, executing methods at each location.
So, Audrey implemented the beginning of this functionality: $obj.*$meth, for single inheritance. As part that she implemented return values. Her design was to compose the final return value as an unconcatenated list of each method's return value. Example: If C.foo returns (1,2,3) and D.foo returns(4,5,6) you get $obj.*$meth.[0][0] == 1 $obj.*$meth.[1][0] == 4 That works OK for me. If there's a downside, if there is a downside, it's that it could be hard to track down where a mysterious return value came from, since the return value object doesn't tell you exactly which methods were called, and in which order. Mark