Re: Flexible type hinting

From: Date: Thu, 02 Jul 2009 13:02:18 +0000
Subject: Re: Flexible type hinting
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-44644@lists.php.net to get a copy of this message
Personally, I am uncertain about +int or -int in general, IMO that compromise will eventually be identical to numeric an cause endless confusion for the users between (+/-)int and int. The reason I used a completely different name is to prevent confusion. On 2-Jul-09, at 8:53 AM, Paul Biggar wrote:
On Thu, Jul 2, 2009 at 1:43 PM, Ilia Alshanetsky<ilia@ilia.ws> wrote:
On 2-Jul-09, at 4:45 AM, Paul Biggar wrote:
I think you might not have read what I suggested (it is different than the one I emailed to you privately). What you want is fully supported. If you must be passed an int, use the +int hint.
I'd rather use -int, then +int and make people who want loose typing do the extra bit, because native typing should be strict.
I think everyone wants their favourite to be default. I was eager to have the typing that's currently in the manual be the default, since that's what people are used to seeing. I suggested that strong type checks use +int exactly because that's different to what's in the manual, so there would be no confusion. I'm really looking to get people to agree to the principle that we would like to be able to hint every signature without large changes to the manual, since we've been looking at it for years. Thanks, Paul --Paul Biggar paul.biggar@gmail.com


« previous php.internals (#44644) next »