Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56998 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85505 invoked from network); 22 Dec 2011 14:59:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2011 14:59:25 -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:50293] helo=thrud.alliantinternet.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/41-12618-CC543FE4 for ; Thu, 22 Dec 2011 09:59:24 -0500 Received: by thrud.alliantinternet.com (Postfix, from userid 1001) id 8DCC117432E; Thu, 22 Dec 2011 09:59:21 -0500 (EST) To: "'Alain Williams'" , References: <2095305E-D4E3-4D7E-8218-32EE99688E0C@GMAIL.COM> <2C90FB94-38C4-4270-8C6A-B89304BA8ED8@gmail.com> <159A7CA2-8561-40DA-9434-CAAE12304DDB@gmail.com> <005701ccc0b3$58c8dee0$0a5a9ca0$@alliantinternet.com> <20111222145159.GY25857@alliantinternet.com> In-Reply-To: <20111222145159.GY25857@alliantinternet.com> Date: Thu, 22 Dec 2011 09:59:16 -0500 Message-ID: <006101ccc0ba$46b81160$d4283420$@alliantinternet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Thread-Index: AczAuWAP60g0x/SIQNCkwDw1ZtgutAAAIPuw Content-Language: en-us Subject: RE: [PHP-DEV] Return Type Hinting for Methods RFC From: dsnytkine@Ultralogistics.com ("Dmitri Snytkine") I never said to make it mandatory, only to make it available. Just like the type hinting of function call is optional but not mandatory, which is a big advantage over Java in my opinion. After all, if you make return type hinting mandatory, it would break 100% of all existing php scripts. To clarify I am asking to make type hinting for variable declaration an available option. 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: Alain Williams [mailto:addw@phcomp.co.uk] Sent: Thursday, December 22, 2011 9:52 AM To: internals@lists.php.net Subject: Re: [PHP-DEV] Return Type Hinting for Methods RFC On Thu, Dec 22, 2011 at 03:33:40PM +0100, Sebastian Krebs wrote: > > private \ArrayObject $customers; > > > > Once more "Why is PHP not Java?" That comment confuses matters. People use PHP for all sorts of reasons, the desire to tighten up in some places, on some occasions, should not be treated with derision. Tighter declarations, or any declarations at all, would not be mandatory. It would be something that some projects might want to do. It would be nice if this could be done on a module but module basis ... eg the implementors of a class library might want to be really strict while allowing the class users to not be strict. Just because Java has a feature that you appear to not like, does not mean that others might not want it in some circumstances. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php