Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56993 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75691 invoked from network); 22 Dec 2011 14:09:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2011 14:09:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=dsnytkine@Ultralogistics.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dsnytkine@Ultralogistics.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain Ultralogistics.com from 64.197.110.172 cause and error) X-PHP-List-Original-Sender: dsnytkine@Ultralogistics.com X-Host-Fingerprint: 64.197.110.172 thrud.alliantinternet.com Received: from [64.197.110.172] ([64.197.110.172:39038] helo=thrud.alliantinternet.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/C2-47744-92A33FE4 for ; Thu, 22 Dec 2011 09:09:45 -0500 Received: by thrud.alliantinternet.com (Postfix, from userid 1001) id C1BE2174321; Thu, 22 Dec 2011 09:09:42 -0500 (EST) To: "'Will Fitch'" , "'Pierre Joye'" Cc: "'Nikita Popov'" , "'PHP Developers Mailing List'" References: <2095305E-D4E3-4D7E-8218-32EE99688E0C@GMAIL.COM> <2C90FB94-38C4-4270-8C6A-B89304BA8ED8@gmail.com> <159A7CA2-8561-40DA-9434-CAAE12304DDB@gmail.com> In-Reply-To: <159A7CA2-8561-40DA-9434-CAAE12304DDB@gmail.com> Date: Thu, 22 Dec 2011 09:09:40 -0500 Message-ID: <005701ccc0b3$58c8dee0$0a5a9ca0$@alliantinternet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Thread-Index: AczAMBMzw1Q/H3chTAK9nF8ms7W/0AAgm6jA Content-Language: en-us Subject: RE: [PHP-DEV] Return Type Hinting for Methods RFC From: dsnytkine@Ultralogistics.com ("Dmitri Snytkine") The return type hinting is probably the biggest thing happening in php in a long time. Is this too good to be true? With return type hinting I can see a huge improvenets in php IDEs in spotting errors. Also it will be much easier to auto generate wsdl files when return types are known to a compiler. These are just to name a couple of important benefits that can come out of it. What I don't see is any discussion of being able to declare the type of variable, you now, like in Java. ie: private \ArrayObject $customers; Also, is there an implicit "void" return type? I hope that declaring types of variables will be added too because without it, this feature is not all that useful. Dmitri Snytkine Web Developer Ultra Logistics, Inc. Phone: (888) 220-4640 x 2097 Fax: (888) 795-6642 E-Mail: dsnytkine@ultralogistics.com Web: www.ultralogistics.com "A Top 100 Logistics I.T. Provider in 2011" -----Original Message----- From: Will Fitch [mailto:will.fitch@gmail.com] Sent: Wednesday, December 21, 2011 5:29 PM To: Pierre Joye Cc: Nikita Popov; PHP Developers Mailing List Subject: Re: [PHP-DEV] Return Type Hinting for Methods RFC Hi Pierre and Nikita, I have added callable to the patch and updated the RFC entry to reflect the changes. Please verify and let me know if you have any issues. On Dec 21, 2011, at 2:33 PM, Pierre Joye wrote: > hi Will, > > You should add it now, while 5.4 final is not released yet, this > feature exists already and should be part of the RFC, to be complete. > > Cheers, > > On Wed, Dec 21, 2011 at 6:22 PM, Will Fitch wrote: >> Hi Nikita, >> >> I didn't add that as it's not yet in production. As soon as things are finalized and 5.4 is GA, I will gladly add the callable type hint. The change wouldn't be different from parameter type hinting, and can easily be added. >> >> On Dec 21, 2011, at 12:17 PM, Nikita Popov wrote: >> >>> Hi Will! >>> >>> One random thought I had while reading the RFC is: What about the >>> newly introduced callable typehint? Is this missing by intention? I >>> could well imagine so (because it's hard to check what scope >>> callability should be checked on), but wanted to be sure on that. >>> >>> Nikita >>> >>> On Wed, Dec 21, 2011 at 3:09 AM, Will Fitch wrote: >>>> Hello All, >>>> >>>> I would like to submit https://wiki.php.net/rfc/returntypehint2 into discussion. A link to the patch for this is provided and can be ran against the current HEAD. >>>> >>>> There is an older entry still in existence, but this patch is syntactically different. The older entry is located at https://wiki.php.net/rfc/typechecking and is bundled with parameter, scalars, etc. >>>> >>>> If possible, can someone promote this to the "Under Discussion" category within https://wiki.php.net/rfc? >>>> >>>> -- Will >>>> -- >>>> PHP Internals - PHP Runtime Development Mailing List >>>> To unsubscribe, visit: http://www.php.net/unsub.php >>>> >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > > -- > Pierre > > @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php