|
Posted by The Natural Philosopher on 09/04/07 17:05
Michael Fesser wrote:
> .oO(The Natural Philosopher)
>
>> ELINTPimp wrote:
>>>> PHP is in some respects retrograde: Its too much like BASIC in that you
>>>> can 'hack it till it works' too easily.
>>> Agreed, but that's why test driven development has such an important
>>> place in our world...but that is just another form of programmer
>>> introduced standard. Just like PHP's loosely typed aspect, it's a
>>> double edge sword...but I wouldn't have it any other way =).
>>>
>> coming from strictly typed C I find it awful.
>
> Loose typing in scripting languages is not a bug, but a feature, even if
> many people seem to have a problem with that. JavaScript for example has
> the same feature, but surprisingly nobody complains about it there. It's
> always just PHP which is blamed.
>
I find it even worse frankly. Still one has to adapt to what is there.
Ive seen perfectly respectable 10000 customer SOP systems coded in
interpreted BASC before now, and if its dine to a standard its no worse
than anting else.
>> When I want to cast a string to an integer, I'd rather do it explicitly..
>>
>> I mean
>>
>> $int="0"
>>
>> If($int==0) echo "true";
>> if($int) echo "its non zero"
>>
>> I am still not sure WHAT that last statement means, 0 means unsassigned,
>> non zero, or what...
>
> The second statement simply means that the value of $int, whatever it
> may be, evaluates to FALSE.
>
but what is "false", in this context? Null length string? string
containing "0" Magic value?
> Micha
Navigation:
[Reply to this message]
|