Thomas Sandlaß skribis 2005-04-28 18:09 (+0200):
> >I still want <->, by the way.
> Me too. And I guess <- naturally completes the set.
Although it would complete the set, in the months since I first started
wanting <->, I have not been able to come up with a good reason to want
write-only bindin
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
Juerd skribis 2005-04-28 14:47 (+0200):
> Yes, because a pair is an object (reference), and it's not the .value
> that you're passing ro.
An example of what would go wrong:
for %hash.pairs>>.value -> $value {
$value = ...;
}
But this will work:
for %hash.pairs>>.value {
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 still
Hi,
does the following work as expected?
for %hash.pairs -> $pair { # Note: No "is rw"!
$pair.value = ...; # Modifies %hash
}
Or is it necessary to declare $pair as is rw? (The snippet does not
modify $pair, but $pair.value.)
--Ingo
--
Linux, the choice of a GNU | The next stat