Re: RE: Optional scalar type hinting
| From: | Tomi Kaistila | Date: | Fri, 04 Jan 2008 00:21:27 +0000 |
| Subject: | Re: RE: Optional scalar type hinting | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34376@lists.php.net to get a copy of this message | ||
> If you change data, result changes - surprise! If you set $n2 to 42,
> result would be wrong too, if by right you mean $n2 being 1 and not 42.
> How it has anything to do with static typing?
Ohh gee wiz... Well odds are that you would not want the value to increase by
zero, when the intention was to increase with anything but zero.
Would type hinting help? Well, it would efficiently assure that the value
passed into it was a number and thus the resulted would not get screwed
because we assumed PHP's type juggling would save the day.
Honestly Stanislav, do you even care or read what people write to or is it
your intension only to knit-pick and and be a thicky?
Here is the short version for you. Yes, we all agree that there are existing
workarounds to having scalar values typed hinted. Just like we could have
workarounds for the missing OO features in PHP 4? This does not invalidate
the need for either feature.
Tomi Kaistila
PHP Developer