develooper Front page | perl.perl5.porters | Postings from July 2010

Re: [perl #76438] peephole optimiser could prune more dead code

Thread Previous | Thread Next
From:
Ben Morrow
Date:
July 13, 2010 10:55
Subject:
Re: [perl #76438] peephole optimiser could prune more dead code
Message ID:
20100713175533.GA65722@osiris.mauzo.dyndns.org
Quoth nick@ccl4.org (Nicholas Clark):
> On Tue, Jul 13, 2010 at 01:11:11PM +0000, �var Arnfj�r� Bjarmason wrote:
> 
> > Of course we can't liberally change things that are documented to be
> > undefined as liberally as a C compiler would, becuase there's only one
> > perl(1) but multiple cc(1)'s.
> 
> But whatever we call it, that's the key problem. There is only one
> implementation, and as that implementation strives hard to internally avoid
> C undefined behaviour, its output will be deterministic, in some fashion.
> Hence people come to rely on the current behaviour of the implementation,
> documented or not.

Quite. And 

    print $i++, $i++;

has DWIM forever (probably since perl 1). I'm not saying we *cannot*
change it, just that any change needs to be either only within the scope
of a lexical pragma or to go through a full deprecation cycle with
mandatory warnings before it changes.

Ben


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