Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^8: Shouldn't references be readonly? (updated)

by LanX (Sage)
on Aug 05, 2020 at 21:41 UTC ( #11120367=note: print w/replies, xml ) Need Help??

in reply to Re^7: Shouldn't references be readonly? (updated)
in thread Shouldn't LITERAL references be readonly? (updated)

> But regardless of that, there is still the question of whether the reference returned by [] and {} should be marked readonly. I suppose it could be but Larry never thought to do so,

Thanks, at least someone beside Hauke who is not trying to convince me that the issue doesn't exist at all. \o/

> and there doesn't seem any point in changing it now.

Well ... catching errors would be an issue, don't you think?

But like always with old errors, I wouldn't surprised if they became "features".

After changing, some CPAN modules might break because they did something like

sub func { $_[0] //= { the_default => "values" }; ... }

which is a broken approach to default values ...

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120367]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2023-04-01 10:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found