Re: [RFC] Return type-hint
| From: | Ferenc Kovacs | Date: | Thu, 28 Apr 2011 08:39:55 +0000 |
| Subject: | Re: [RFC] Return type-hint | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52047@lists.php.net to get a copy of this message | ||
On Thu, Apr 28, 2011 at 10:23 AM, Stas Malyshev <smalyshev@sugarcrm.com>wrote:
> Hi!
>
> http://wiki.php.net/rfc/returntypehint
>>>
>> for the upcoming 5.4 release, I think it would be extremely useful, even
>> without the scalar stuff.
>>
>
>
> Personally, I see even less point in having strict return typing (please
> stop using "hint" terminology, it confuses the whole matter, it's not
> "hint"
> if it describes mandatory restriction on the data) than strict argument
> typing. The RFC doesn't explain it either beyond "here how you can have some
> nice errors".
> But why would I want to see these errors? How they would make anything
> easier or better?
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
>
do you aware that without the scalar support, the return type hinting would
behave just as "strict" as the argument type hinting is currently.
http://php.net/manual/en/language.oop5.typehinting.php
so maybe type hinting wasn't a good name at the first place, but we should
be consistent with the current naming convention.
Tyrael