|
Posted by Ivαn Sαnchez Ortega on 01/06/08 23:12
A Bit Narked wrote:
> Well, thanks to all for your responses. The php developers get
> 2 marks out of 10 for this, in my book. Arbitrary choices should
> fit *with* people's expectations, not go against them.
Then prove yourself better than them and write a PHP compiler that fits
people's expectations, whatever those are.
> The whole idea of symbolic constants is that they are always
> replaced by the underlying value during translation
You mean in the lexical analysis. Right. But remember that this is PHP, not
C. When you write the constant "true", it gets replaced by a constant of
boolean type, not a constant of integer type. So, PHP is doing it right.
Sorry to dissapoint you here.
I'm going to say it again, just to make sure there are no misunderstandings:
In PHP, a boolean is different than an integer. Get over it.
(BTW, I'm just curious about what is this book you are following there)
Cheers,
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
All I know is what the words know, and dead things, and that
makes a handsome little sum, with a beginning and a middle and
an end, as in the well-built phrase and the long sonata of the dead.
-- Samuel Beckett
Navigation:
[Reply to this message]
|