develooper Front page | perl.perl5.porters | Postings from March 2023

Re: Pre-RFC Deep constants

Thread Previous | Thread Next
From:
Martijn Lievaart
Date:
March 9, 2023 20:25
Subject:
Re: Pre-RFC Deep constants
Message ID:
3bed9cab-1051-c3fd-e32e-25af25db9f22@rtij.nl
Op 09-03-2023 om 21:23 schreef Branislav Zahradník:
>
>
>     Causing @nums to be read-only sounds like a good idea, actually.
>     Immutable data is often a huge win.
>
>
> It can come with "deep copy on write" (it should not affect values it 
> doesn't own yet data should be read-only.


That's also surprising behaviour. Especially when you can write simply [ 
@nums ] instead of \@nums to achieve the same.


HTH,

M4


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About