Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78618 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77816 invoked from network); 4 Nov 2014 08:51:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 08:51:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.107 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.107 smtp107.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.107] ([108.166.43.107:33798] helo=smtp107.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/14-24107-48398545 for ; Tue, 04 Nov 2014 03:51:16 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp14.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 786B13801DA; Tue, 4 Nov 2014 03:51:12 -0500 (EST) X-Virus-Scanned: OK Received: by smtp14.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 038603801F3; Tue, 4 Nov 2014 03:51:11 -0500 (EST) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.3.2); Tue, 04 Nov 2014 08:51:12 GMT Message-ID: <5458937F.9020304@sugarcrm.com> Date: Tue, 04 Nov 2014 00:51:11 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Robert Stoll CC: 'PHP Internals' References: <002601cff777$eb923430$c2b69c90$@tutteli.ch> <000601cff80a$972e0250$c58a06f0$@tutteli.ch> In-Reply-To: <000601cff80a$972e0250$c58a06f0$@tutteli.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: AW: [PHP-DEV] Types on the right or on the left From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > put types only on the right, or only on the left or mix it. I > followed the return type RFC and thus know that many people think it > has to be on the left hand side. Fair enough, I do not have anything > against such a decision. I also have nothing against putting the type > on the right hand side. What merely bothers me is that it would be > another inconsistency in the language design. It's not very intuitive > for a user if a type hint is once on the right hand side and once on > the left hand side. I agree, this is not a very good situation. It would be much better to take a systematic approach to this, but this is impossible since there is no systematic approach to strict typing in PHP, just some pieces here and there. I think this is not right, but obviously many people here disagree and are happy to have the inconsistent syntax. I don't see why "public Foo function bar()" would be so much worse than "public function bar() : Foo" but for some reason this possibility wasn't even considered as far as I can see. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/