in reply to Re: Shouldn't LITERAL references be readonly? (updated)
in thread Shouldn't LITERAL references be readonly? (updated)
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
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Shouldn't references be readonly? (updated)
by ikegami (Patriarch) on Aug 07, 2020 at 01:03 UTC | |
by ikegami (Patriarch) on Aug 07, 2020 at 01:19 UTC | |
by LanX (Saint) on Aug 07, 2020 at 10:34 UTC | |
by ikegami (Patriarch) on Aug 07, 2020 at 19:54 UTC | |
by LanX (Saint) on Aug 08, 2020 at 01:17 UTC | |
|
In Section
Seekers of Perl Wisdom