Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78656 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79678 invoked from network); 4 Nov 2014 18:08:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 18:08:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:41408] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/9C-06676-51619545 for ; Tue, 04 Nov 2014 13:08:22 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id C66398C007D; Tue, 4 Nov 2014 13:08:18 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id H6Goh5_aRhfp; Tue, 4 Nov 2014 13:08:18 -0500 (EST) Received: from oa-edu-170-172.wireless.abdn.ac.uk (oa-edu-170-172.wireless.abdn.ac.uk [137.50.170.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 43E078C007B; Tue, 4 Nov 2014 13:08:16 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) In-Reply-To: <545910F1.8030904@sugarcrm.com> Date: Tue, 4 Nov 2014 18:08:15 +0000 Cc: Leigh , Robert Stoll , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <859A97F0-7C58-406A-857B-557F8AA657AD@ajf.me> References: <002601cff777$eb923430$c2b69c90$@tutteli.ch> <000601cff80a$972e0250$c58a06f0$@tutteli.ch> <5458937F.9020304@sugarcrm.com> <545910F1.8030904@sugarcrm.com> To: Stas Malyshev X-Mailer: Apple Mail (2.1990.1) Subject: Re: [PHP-DEV] Types on the right or on the left From: ajf@ajf.me (Andrea Faulds) > On 4 Nov 2014, at 17:46, Stas Malyshev wrote: >=20 > Hi! >=20 >>> "public Foo function bar()" would be so much worse than "public = function >>> bar() : Foo" >>=20 >> Because when you grep for "function bar", in future you'd have to = know >> the return type too. >=20 > Sorry, I do not understand - why to grep for "function bar" you'd have > to know the type? Just grep for "function bar" as you did before. Because if that function has a return type, e.g.: public function Foo bar() Then you couldn=E2=80=99t grep for =E2=80=9Cfunction bar=E2=80=9D = because of the Foo. If we used this syntax instead, which wouldn=E2=80=99t disrupt grep: public Foo function bar(); It=E2=80=99d be inconsistent with normal function declarations which = would have to have Foo after function. -- Andrea Faulds http://ajf.me/