Juerd wrote:
Ingo Blechschmidt skribis 2005-04-28 14:30 (+0200):

does the following work as expected?
 for %hash.pairs -> $pair { # Note: No "is rw"!
   $pair.value = ...;       # Modifies %hash
 }


Yes, because a pair is an object (reference), and it's not the .value
that you're passing ro.

I come to the some answer but with a different argument. Calling the .value method on $pair is not considered a write operation. And indeed the %hash could arrange for staying unchanged by having a corresponding copy out implementation of its .pairs method.


I still want <->, by the way.

Me too. And I guess <- naturally completes the set. Which in turn make me want the parameter traits 'is input' and 'is output'. The former is a synonym (or replacement?) for 'is const'. Both together form 'is rw' which would be an abbreviation of 'is input&output'.


Regards, -- TSa (Thomas Sandlaß)




Reply via email to