Re: [RFC] Return type-hint
| From: | Victor Bolshov | Date: | Fri, 30 Jul 2010 04:46:33 +0000 |
| Subject: | Re: [RFC] Return type-hint | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49183@lists.php.net to get a copy of this message | ||
+1 for "one could use the full qualified name to refer to the class name".
Making the developer care about the case of characters in one special case -
that's the sort of changes that lead to chaos. Remember that type conversion
works in a case-insensitive manner and so does most of the language
constructs:
(int) $x === (INT) $x
intvav($x) === INTVAL($x)
and so on
2010/7/29 Josh Davis <phpwnd@gmail.com>
> On 29 July 2010 13:57, Felipe Pena <felipensp@gmail.com> wrote:
> > My suggestion (I guess already told it in some mail...) is to
> > identify the native php type just when it's lowercased (case-sensitive)..
>
> Alternatively, one could use the full qualified name to refer to the
> class name, e.g.
>
> function expectsScalar(string $str) {}
> function expectsObject(\string $obj) {}
>
> -JD
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
С уважением,
Виктор