develooper Front page | perl.perl5.porters | Postings from November 2009

Re: [PATCH] Perl RT#3105 Mark elements of constant range as read only

Thread Previous | Thread Next
From:
Eric Brine
Date:
November 26, 2009 10:38
Subject:
Re: [PATCH] Perl RT#3105 Mark elements of constant range as read only
Message ID:
f86994700911261038r46f319b6u7ac6e1334860c141@mail.gmail.com
On Thu, Nov 26, 2009 at 3:37 AM, Rafael Garcia-Suarez <rgs@consttype.org>wrote:

> I'd rather have it the other way around : make the for(1,2,3) variant
> work, with some sort of copy-on-write.
>

I'm going to worry about CONST..CONST first.

Behaviour in 5.12 and earlier:
CONST..CONST returns something that can be modified, but that you're not
allowed to modify.

What the bug report requests and what the patch provides:
CONST..CONST returns something that can't modified.

What I'd like:
CONST..CONST to return something that you can modify.

Means of achieving this:
Remove the optimisation that computes the list at compile-time.

Any other faster means?
I don't know. You mentioned copy on write. Is there an existing mechanism
for that?


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