FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » loose thinking
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: loose thinking [message #176790 is a reply to message #176789] Tue, 24 January 2012 16:28 Go to previous message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma:
Senior Member
Am 24.01.2012 17:02, schrieb Arno Welzel:
> M. Strobel, 2012-01-24 14:32:
>
>> Am 24.01.2012 14:04, schrieb "Álvaro G. Vicario":
>>> El 24/01/2012 11:57, M. Strobel escribió/wrote:
>>>> I hate this sloppiness of PHP:
> [...]
>>>> There is no difference between an empty string and null in array indexing. That is
>>>> stupid. Why does the language not just respect my definitions?
>>>
>>> Because your make your definitions fit in something that already have a previous
>>> definition. String keys must be integers or strings, as documented:
>>>
>>> http://es.php.net/manual/en/language.types.array.php#language.types.array.s yntax.array-func
> [...]
>> I am angry about it because not even isset() respects the null value here. I think it
>> makes more sense this way: isset($a[null]) should return false, because there is no
>> null index.
>>
>> The point is that the designers of PHP (if you can talk about design here) probably
>> meant to help programmers in not making all these hideous type distinctions, but the
>> outcome is you have to be really careful about loose comparison and unwanted type
>> conversion, having to write even more if constructs.
>
> Well - the roots of PHP are PHP/FI which could not be called a
> "designed" language.
>
> See <http://www.php.net/manual/phpfi2.php#history>
>
> *scnr*
>

I did not want to be too harsh here. When I started with PHP I wondered why I had to
put the dollar sign on every variable, the language designers did not know the
difference between a variable and a value. Than I had to rename all my .php3
scripts to .php4 and got used to it.

/Str.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Open Source Customization
Next Topic: Product page getting Redirect back to Home page - Please Fix
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 03:14:45 GMT 2024

Total time taken to generate the page: 0.04306 seconds