in reply to Re^2: Shouldn't references be readonly?
in thread Shouldn't LITERAL references be readonly? (updated)
I am considering "literals" as more like constants embedded in the program, using a constant pool, where changing a value would have bizarre effects, like changing the value of "123456" everywhere in the program. Literal strings in C programs are often combined in this way.
The {} and [] operators are defined to produce distinct mutable aggregates every time they are evaluated. In this sense, they are not literals.
I am unsure how this behavior of replacing the reference itself is actually useful, but nor do I see any harm here.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Shouldn't references be readonly?
by LanX (Sage) on Aug 05, 2020 at 21:50 UTC | |
by jcb (Parson) on Aug 05, 2020 at 22:13 UTC | |
by LanX (Sage) on Aug 05, 2020 at 22:21 UTC |
In Section
Seekers of Perl Wisdom