Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71317 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46412 invoked from network); 20 Jan 2014 09:58:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2014 09:58:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@tutteli.ch; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=php@tutteli.ch; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tutteli.ch designates 80.74.154.78 as permitted sender) X-PHP-List-Original-Sender: php@tutteli.ch X-Host-Fingerprint: 80.74.154.78 ns73.kreativmedia.ch Linux 2.6 Received: from [80.74.154.78] ([80.74.154.78:43570] helo=hyperion.kreativmedia.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/E8-02192-E33FCD25 for ; Mon, 20 Jan 2014 04:58:23 -0500 Received: (qmail 13191 invoked from network); 20 Jan 2014 10:58:17 +0100 Received: from heim-032-99.raab-heim.uni-linz.ac.at (HELO RoLaptop) (193.171.32.99) by ns73.kreativmedia.ch with (AES128-SHA encrypted) SMTP; 20 Jan 2014 10:58:17 +0100 To: "'Lazare Inepologlou'" Cc: "'internals'" References: <002d01cf1234$01e6dc60$05b49520$@tutteli.ch> <004c01cf123d$35730870$a0591950$@tutteli.ch> <52D71748.1090402@googlemail.com> <52D71FAE.8030002@ajf.me> <005001cf124f$3a40df00$aec29d00$@tutteli.ch> <20140116110127.202079vzjsj76n7b@webmail.tutteli.ch> <0B.B1.24763.139B7D25@pb1.pair.com> <002001cf12da$2bfbda90$83f38fb0$@tutteli.ch> <52DCA3E7.80602@lerdorf.com> <52DCC067.9090603@gar fieldtech.com> In-Reply-To: Date: Mon, 20 Jan 2014 10:58:15 +0100 Message-ID: <004701cf15c6$23660470$6a320d50$@tutteli.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGahXeLh/KZbd8XAeJ9KP0Xitay+ALEucEqAx8utqACqtBDzQKRtClgAWWf+lcCX4Kx1gHC+GyIAgNcg4YBEz9CWQDvBFdyAu6br9kCL2LDqQKSKc2VAbc66pQDJngE8QEOUWWkAR3dyz8DGmSzsAGY8C43AO12gL2Zrjje8A== Content-Language: de-ch Subject: RE: [PHP-DEV] Introducing "Array Of" RFC From: php@tutteli.ch ("Robert Stoll") 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