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

Re: Order of evaluation of terms (was peephole optimiser couldprune more dead code)

Thread Previous | Thread Next
From:
Abigail
Date:
July 29, 2010 09:22
Subject:
Re: Order of evaluation of terms (was peephole optimiser couldprune more dead code)
Message ID:
20100729162318.GJ3850@almanda
On Fri, Jul 16, 2010 at 12:18:48AM +0200, demerphq wrote:
> 
> I agree, and I think that Jan's comment:
> 
> <quote>
> My personal opinion is that any FETCH magic or overloaded operator that
> has observable side effects is essentially broken and abusing a feature.
> You can always use a function or method call if you need exact control
> over how your code is being called.
> </quote>
> 
> should, after appropriate editing, be added to the documentation for
> tie as well.

I *strongly* disagree with this sentiment.

Part of the appeal of a tied variable is that you can throw it at a piece
of code you do not control (or do not want to change).

Saying one could just replace uses with a function or method call would 
have been a great argument when the tieing mechanism was first introduced -
but we're way past this point now.



Abigail

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