RE: [PHP-DEV] Introducing "Array Of" RFC

From: Date: Mon, 20 Jan 2014 09:58:15 +0000
Subject: RE: [PHP-DEV] Introducing "Array Of" RFC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-71317@lists.php.net to get a copy of this message
Hey Lazare > -----Original Message----- > From: Lazare Inepologlou [mailto:linepogl@gmail.com] > Sent: Monday, January 20, 2014 10:54 AM > Cc: internals > Subject: Re: [PHP-DEV] Introducing "Array Of" RFC > > Hello, > > > on 2014/1/16 Sara Golemon wrote: > > > * Soft types - Any type preceeded by an at sign is hinted as that type, > > but not checked: > > function foo(@Bar $IHopeYoureABarObject) {...} > > > Nobody has commented so far about this feature of HHVM, which, in my > opinion is a win-win: > > + Clarifies the contract between the function designer and the function > user. > + Makes the life easy for IDEs and static analysis tools. > + No run-time penalty. > > Thoughts? > I think it suits PHP very well but that would definitely be a different RFC. And btw. "soft" type hints would not work for typed arrays (since this can only be checked during runtime

« previous php.internals (#71317) next »