Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #4605
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!hirsch.in-berlin.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
| Newsgroups | comp.lang.php |
| Subject | Re: loose thinking |
| Date | Tue, 24 Jan 2012 19:43:39 +0100 |
| Lines | 58 |
| Message-ID | <9o8cerFfnnU1@mid.uni-berlin.de> (permalink) |
| References | <9o7h5fFu6rU1@mid.uni-berlin.de> <jfma85$qmb$1@dont-email.me> <9o7q84F33fU1@mid.uni-berlin.de> <jfmi71$87t$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de bp9v55Ok1JYAehpEDMmf8ANGZ3QcUuwM6QwBXRXZOnmK3Q428= |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.24) Gecko/20111101 Thunderbird/3.1.16 |
| In-Reply-To | <jfmi71$87t$1@dont-email.me> |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.php:4605 |
Show key headers only | View raw
Am 24.01.2012 16:20, schrieb "Álvaro G. Vicario":
> El 24/01/2012 14:32, M. Strobel escribió/wrote:
>> Okay I see it is well documented. I just started testing.
>>
>> 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.
>
> Whatever implementation details are chosen, they need to be coherent.
> I think your proposed behaviour would lead to pretty counter-intuitive situations:
>
> $foo[NULL] = 33;
> if( isset($foo[NULL]) ){
> echo $foo[NULL];
> }else{
> echo '$foo[NULL] is not set'; // Seriously? WTF?
> }
>
>
>> 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.
>
> The PHP language has basically evolved along the years as a living creature would do,
> unlike other languages that have actually been designed "on purpose", and it has lots
> of obvious inconsistencies. But you are basically suggesting that there's no place
> for loosely typed languages and I disagree with that. I'm very happy that I don't
> need to write three overloaded versions of the same method just to cope with all the
> expected input data types.
>
> Whatever, if you do web stuff and you prefer strong typing I believe you do have
> quite a choice, from Java to .NET (VisualBasic and C#). Don't stick with PHP if you
> are not going to enjoy its good parts.
>
Enjoy the good parts, but can't avoid the bad parts. Some public wailing will warn
the lurkers.
The Windows stuff is not portable, and system complexity far above unix. Maybe not if
you just click. Programmers don't just click.
/Str.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
loose thinking "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-24 11:57 +0100
Re: loose thinking "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-01-24 14:04 +0100
Re: loose thinking "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-24 14:32 +0100
Re: loose thinking The Natural Philosopher <tnp@invalid.invalid> - 2012-01-24 13:41 +0000
Re: loose thinking Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-24 09:35 -0500
Re: loose thinking "Peter H. Coffin" <hellsop@ninehells.com> - 2012-01-24 08:16 -0600
Re: loose thinking "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-24 17:35 +0100
Re: loose thinking The Natural Philosopher <tnp@invalid.invalid> - 2012-01-24 16:59 +0000
Re: loose thinking "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-24 19:11 +0100
Re: loose thinking Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-25 04:49 +0100
Re: loose thinking "Peter H. Coffin" <hellsop@ninehells.com> - 2012-01-25 07:58 -0600
Re: loose thinking Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-25 20:37 +0100
Re: loose thinking "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-01-24 16:20 +0100
Re: loose thinking The Natural Philosopher <tnp@invalid.invalid> - 2012-01-24 15:43 +0000
Re: loose thinking "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-24 19:43 +0100
Re: loose thinking Arno Welzel <usenet@arnowelzel.de> - 2012-01-24 17:02 +0100
Re: loose thinking "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-24 17:28 +0100
csiph-web