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

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

Thread Previous | Thread Next
From:
demerphq
Date:
August 4, 2010 03:30
Subject:
Re: Order of evaluation of terms (was peephole optimiser could prune more dead code)
Message ID:
AANLkTikTbwj2_10TaO8EqY=mRhM3A=u==CB8NAEg2O24@mail.gmail.com
On 29 July 2010 18:23, Abigail <abigail@abigail.be> wrote:
> 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.

IMO this is FUD.

This is about ties with observable side effects. Not about using ties at all.

In particular it is about ties that change themselves while being used...

cheers,
Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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