strredwolf: (Default)
STrRedWolf ([personal profile] strredwolf) wrote2005-09-13 07:29 pm

PHP is like Perl, but only so much.

I miss Perl's unless control structure.  Perl has better "english" making things readable.  It's so good, you can do Perl Poetry.

Ugh.  PHP needs to do better.

[identity profile] darthparadox.livejournal.com 2005-09-13 11:51 pm (UTC)(link)
read() or die;

[identity profile] kazriko.livejournal.com 2005-09-14 04:52 pm (UTC)(link)
Good show, bad programming construct. ;)

[identity profile] zimzat.livejournal.com 2005-09-14 02:34 am (UTC)(link)
*does a quick search*

unless ($a == $b) is the same as if ($a != $b)

ugh. That's just lazy.

[identity profile] eidolos.livejournal.com 2005-09-14 04:47 pm (UTC)(link)
Sure, until you get to expressions that are far more complex than $a == $b.

[identity profile] zimzat.livejournal.com 2005-09-14 04:52 pm (UTC)(link)
Care to give an example of such an expression?

[identity profile] kazriko.livejournal.com 2005-09-14 04:53 pm (UTC)(link)
Anyone who's been through computer architecture should be able to handle a simple logical negation by hand... besides, you can just wrap the whole mess up and throw a Not in front of it if you need to.

[identity profile] strredwolf.livejournal.com 2005-09-14 05:03 pm (UTC)(link)
While all very true, Perl programmers know how to be lazy (it's one of their virtures). So why would you want to do an if(!(expression)) when you can say unless(expression)? Or, in English, "If not this, do that" compared to "unless this happened, do that."


[identity profile] kazriko.livejournal.com 2005-09-14 05:10 pm (UTC)(link)
While all very true, Perl programmers know how to be lazy (it's one of their virtures).

And that's another in a long list of reasons Perl is a WORN language. (Write once read never)