Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78703 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76556 invoked from network); 5 Nov 2014 04:49:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2014 04:49:17 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.91 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.91 smtp91.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.91] ([108.166.43.91:44674] helo=smtp91.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 74/70-07533-C4CA9545 for ; Tue, 04 Nov 2014 23:49:17 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp4.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 2602E1801B6; Tue, 4 Nov 2014 23:49:14 -0500 (EST) X-Virus-Scanned: OK Received: by smtp4.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 6446518016D; Tue, 4 Nov 2014 23:49:13 -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); Wed, 05 Nov 2014 04:49:14 GMT Message-ID: <5459AC48.7080109@sugarcrm.com> Date: Tue, 04 Nov 2014 20:49:12 -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: Levi Morrison CC: Rasmus Lerdorf , Andrea Faulds , Leigh , Robert Stoll , PHP Internals References: <002601cff777$eb923430$c2b69c90$@tutteli.ch> <000601cff80a$972e0250$c58a06f0$@tutteli.ch> <5458937F.9020304@sugarcrm.com> <545910F1.8030904@sugarcrm.com> <859A97F0-7C58-406A-857B-557F8AA657AD@ajf.me> <545917A2.6000206@lerdorf.com> <545977E1.2060700@sugarcrm.com> <54599A0F.2060400@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Types on the right or on the left From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > C++11 adds suffixed types for returns despite having prefixed types > for everything else, including previous return types. C++ does it for entirely different reasons, related to scoping, and it still has "auto" type at the beginning. In any case, I'd be very vary taking late C++ hacks as a guide for syntax, as advanced C++ syntax is not something I would recommend as an example of clarity. > 3) Claiming compatibility for things which aren't proposed is meaningless. > > People have already asked for support for static return types; doing People asked for a lot of things, it doesn't mean it makes sense. "static" as return type doesn't, since it does not specify any type at all - it just says "I will return a type that is this class or derived from this class" - which is the same as saying 'self'. There's no additional information one can gather from 'static' declaration which is not in 'self' declaration, and I see no use case to ever use it. > ` "function" "( ")` would > then be ambiguous. This is not some pie-in-the sky issue. It's not, it's a non-issue at all, since "static" does not make sense in that context. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/