Re: [RFC] Type hints (parameter and return value)
| From: | Sam Barrow | Date: | Fri, 18 Apr 2008 11:47:46 +0000 |
| Subject: | Re: [RFC] Type hints (parameter and return value) | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37132@lists.php.net to get a copy of this message | ||
On Fri, 2008-04-18 at 12:33 +0100, Richard Quadling wrote:
> On 18/04/2008, Arvids Godjuks <arvids.godjuks@gmail.com> wrote:
> > +1 for strict types.
> >
> > That way it will be simple:
> > * Don't need - then don't use at all
> > * You need it - you use it fully.
> >
> > One thing than left to clearfy - do we allow to hint only part of args or do
> > we go the road "if hint args, then hint them all!" (I'm personaly for
> > second
> > one - be strict)
> >
>
> It may be that a parameter CAN be mixed, so a lack of a type hint
> should be supported even if strict type hinting is used/implemented.
> Maybe a type hint of mixed?
>
Of course; we don't make type hinting necessary, just type the variable
name with no type hint as you would now and no type check is performed.
> --
> -----
> Richard Quadling
> Zend Certified Engineer :
> http://zend.com/zce.php?c=ZEND002498&r=213474731
> "Standing on the shoulders of some very clever giants!"
>