develooper Front page | perl.perl5.porters | Postings from April 2020

Re: chained comparisons

Thread Previous | Thread Next
From:
Sawyer X
Date:
April 9, 2020 11:17
Subject:
Re: chained comparisons
Message ID:
a38f07a0-c178-080b-790d-d58df8843cde@gmail.com
Honestly, I think this is the best compromise.



On 4/8/20 7:11 PM, David Nicol wrote:
>
>
> so document this and recommend making local copies of the fetched 
> values from expensive tied variables, at least for now
>
>
> my $middleval = $tiedthing;
> if ($lowerbound < $middleval < $upperval) { ...
>
>
>     . All users see is that a tied variable is being evaluated twice.
>
>
>
> -- 
> "I know Darth Vader's really got you annoyed
>  but remember if you kill him then you'll be unemployed" -- Alfred M. 
> Yankovic

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