Re: comparable Perl "unless" in PHP?
| From: | Mike E | Date: | Mon, 06 Nov 2000 19:00:38 +0000 |
| Subject: | Re: comparable Perl "unless" in PHP? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23954@lists.php.net to get a copy of this message | ||
* Sander Pilon (sander@3dnews.net) wrote:
> Tssk tssk tssk.. bad coding :)
>
> !x==y reads pretty bad.
>
> It could read !(x==y) or (!x)==y, it'd never pass any respectable coding
> standard.
>
> As for perl, I never understood why there is an unless statement. Perhaps it
> makes interprenting it somewhat faster. (one for unless(x) vs two statements
> for if(!x))
> Also, the one-line thingies in perl are pretty neat.
Because perl tries to make programming english-like. Often, you
can read perl code aloud and it makes perfect sense. It's not for
everyone, but I appreciate it, as all the little things like the
unless statement in perl combine to make perl the awesome language
that it is.
Mike
ps: Lang holy wars are stupid! perl and php both rock.
--
Mike Erickson <mee (at) quidquam.com> http://www.quidquam.com/
Be happy. It is a way of being wise.