Re: [PHP4BETA] Add NOT, AND, OR to language
| From: | Christian Schneider | Date: | Wed, 19 Jan 2000 13:35:24 +0000 |
| Subject: | Re: [PHP4BETA] Add NOT, AND, OR to language | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9286@lists.php.net to get a copy of this message | ||
garyb@fxt.com wrote:
> but it also would make some bugs harder to miss for the rest of us if the
> language also supported NOT, OR, and AND as substitutes.
Hmmm... On the other hand it can be very confusing (in my experience)
for newbies to understand why some perl scripts use 'and' and others use
'&&'. It's the perl philosophy to have more than one solution to one
problem but to keep the PHP language as simple as possible I'd rather
give them one single option to basic stuff life logical operators.
Especially since I love PHP for its simple syntax.
> Nichlaus Wirth would of course encourage support for ::= instead of = as
> well, per the ambiguity resulting from allowing conditionals to contain
> assignments. :O)
As a former student of Niklaus Wirth (check out the spelling ;-)) I'd
say he was advocating ':=' as in mathematical assigment, not '::=' :-)
I agree that
if ($result = some_function())
may be dangerous but I still like it even though I got used to Java's
if ((result = some_function()) == true)
after a while.
Anyway, changing this would break a lot existing code and I'd say it's
non-crucial.
Ceterum censeo: The OOP issues are much more annoying to me. Don't get
upset, I know that PHP is not an OOP language. But I still think
assigning an object should make a reference, not a copy (-:C
Just my $.02,
- Chris
--
Chris Schneider - mailto:cschneid@relog.ch
Computers are not intelligent. They only think they are.