On 7/10/2011 5:15 PM, Father Chrysostomos wrote: > If you make them read-only it defeats the purpose of having an alias. Um. I think you're assuming a conclusion there, specifically, that you know the only purposes an alias can have. Obviously I have a purpose in mind that read-only-ness does not defeat. > If you want something more efficient than copying, we have copy-on-write for strings. Can we make perl use that more often? I don't know how much COW is used now, or how it works. COW might offer a bigger speedup than views, depending. Research required. > And isn’t copying an RV or a number just as fast as making a view? Yes for RVs and non-stringified integers, pretty close for the other numbers. > I can’t speak for Perl 6, but making something read-only in Perl 5 just feels un-Perl-5-ish. Perl 5 has to evolve, and Perl 5 has always had some read-only things. Or are you suggesting that ${\3.14159} should be mutable? :) PS: With views being available it's not like all parameters would be readonly in practice; that would just be one of the options, hopefully the default one.Thread Previous | Thread Next