-BEGIN PGP SIGNED MESSAGE-
Moin,
On Friday 17 September 2004 12:41, [EMAIL PROTECTED] wrote:
> Incidentally, the original obfuscated code is pretty damn fast
> if you expect to return False most of the time.
I bet by removing the return statement it gets even faster:
ala:
($one == $tw
Incidentally, the original obfuscated code is pretty damn fast
if you expect to return False most of the time.
Rate if_else - (F) space_ship - (F) space_ship (T)
ternary - (F) if_else - (T) ret_1_or_ret_0 (T) ternary - (T) ret_1_or_ret_0
(F) (control) (F) (control) (T)
i
On Fri, Sep 17, 2004 at 09:33:39AM +0100, [EMAIL PROTECTED] wrote:
>
> it's basically a confusing if else
>
> if ($one == $two) { return 1 } else { return 0 }
Or
return $one == $two;
Dave...
--
We are far too young and clever
-BEGIN PGP SIGNED MESSAGE-
Moin,
On Friday 17 September 2004 10:56, [EMAIL PROTECTED] wrote:
> But that would return '' or 1and presumably the author
> wanted zero instead of an empty string.
>
> Cheers, Brent
> On Fri, Sep 17, 2004 at 09:33:39AM +0100, [EMAIL PROTECTED] wrote:
> > it's
[EMAIL PROTECTED]
Subject: Re: [Devel::Cover] return
conditions
ject: Re: [Devel::Cover] return
conditions
On Sep 16, 2004, at 2:47 PM, Tels wrote:
-BEGIN PGP SIGNED MESSAGE-
Moin,
On Thursday 16 September 2004 23:37, Geoffrey Young wrote:
hi paul :)
I think this has come up before, but I'm not sure what the resolution
was.
I just came across (production) code that looks like this:
return 1 if
>>> return 1 if $one == $two or return 0;
>
>
> Just FYI:
>
> I always wonder why someone would write such code. IMHO this is
> unmaintainable code. I might not be an Perl expert, but I wouldn't consider
> myself a beginner either, especially not at boolean logic. And still, my
> mind canno
-BEGIN PGP SIGNED MESSAGE-
Moin,
On Thursday 16 September 2004 23:37, Geoffrey Young wrote:
> hi paul :)
>
> I think this has come up before, but I'm not sure what the resolution
> was.
>
> I just came across (production) code that looks like this:
>
> return 1 if $one == $two or return