There's more than one way to do things | |
PerlMonks |
Re^2: Shouldn't references be readonly? (updated)by LanX (Saint) |
on Aug 06, 2020 at 12:08 UTC ( [id://11120421]=note: print w/replies, xml ) | Need Help?? |
my main point is that things like this map { ++$_ } [1,2,3] should throw an error, because the mutation of a reference itself doesn't make any sense. And I was asking if there is a reason why they don't. The whole discussion about "literals" is unfortunately only distracting, (though Wikipedia is on my side: Literal (computer programming): "a notation for representing a fixed value in source code" but I don't wanna continue this. NB: fixed doesn't mean (compile-time) constant. It means not variable) Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|