Re: [RFC] Strict type hints (parameter and return value)

From: Date: Thu, 17 Apr 2008 15:17:16 +0000
Subject: Re: [RFC] Strict type hints (parameter and return value)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-37071@lists.php.net to get a copy of this message
Hi Felipe, Thanks for making the change. This is much more consistent. It remains that there is no 'scalar' or 'numeric' hint. Are you planning on including them? I also wonder about allowing NULL for an 'array' type hint. Is this acceptable? The patch seems to indicate it is. If so, why is this allowed? Thanks, Paul On Thu, Apr 17, 2008 at 4:42 PM, Felipe Pena <felipensp@gmail.com> wrote: > Hi. > > Well, thinking better about the behavior of type hinting, i decided to > change the proposal for strict type. I.e. don't accept numeric string > as an intenger, etc. > > If anyone wants use type hinting, i believe that it should be strict. > Otherwise, it makes more sense to not use it. > > Examples, patches and tests: http://wiki.php.net/rfc/typehint > > > -- > Regards, > Felipe Pena. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Paul Biggar paul.biggar@gmail.com

« previous php.internals (#37071) next »