Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56999 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86934 invoked from network); 22 Dec 2011 15:02:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Dec 2011 15:02:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:44554] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/91-12618-78643FE4 for ; Thu, 22 Dec 2011 10:02:32 -0500 Received: by lagj5 with SMTP id j5so3492792lag.29 for ; Thu, 22 Dec 2011 07:02:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=o5/sen5JLw6FulhhhGppfzcsV/n40yzJuRc/yZcFcWA=; b=NS7VwVeMs6QksZAxqy9gpY5VzhwhlHh37eT/JFVZ8I3+Bh5DrOZlMNlfPDLU7pXNyW 7ZHd1bJtW9LM1gz+ifCzR/nggl8pOqmrDO19MlCNMfPYim/Zpf61BepwTfg/dYy9w2vg PD2yRvjSU6XskbiqGhbW0vEYp8iH2XfPFUd4g= MIME-Version: 1.0 Received: by 10.152.145.170 with SMTP id sv10mr9114783lab.6.1324566147815; Thu, 22 Dec 2011 07:02:27 -0800 (PST) Received: by 10.152.108.110 with HTTP; Thu, 22 Dec 2011 07:02:27 -0800 (PST) In-Reply-To: <006101ccc0ba$46b81160$d4283420$@alliantinternet.com> 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> <006101ccc0ba$46b81160$d4283420$@alliantinternet.com> Date: Thu, 22 Dec 2011 16:02:27 +0100 Message-ID: To: Dmitri Snytkine Cc: Alain Williams , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Return Type Hinting for Methods RFC From: nikita.ppv@googlemail.com (Nikita Popov) Could we maybe keep this discussion contained to return value type hints please? Optional variable type hinting is a completely different topic that would require a separate RFC and implementation. If you are interested in this you can propose a RFC for this. Nikita On Thu, Dec 22, 2011 at 3:59 PM, Dmitri Snytkine wrote: > I never said to make it mandatory, only to make it available. Just like t= he > type hinting of function call is optional but not mandatory, which is a b= ig > 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, t= he > 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 thi= s > could be > done on a module but module basis ... eg the implementors of a class libr= ary > 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 mea= n > that > others might not want it in some circumstances. > > -- > Alain Williams > Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, I= T > Lecturer. > +44 (0) 787 668 0256 =A0http://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 > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >