Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78702 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74528 invoked from network); 5 Nov 2014 04:29:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2014 04:29:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.51 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:33713] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/10-07533-AA7A9545 for ; Tue, 04 Nov 2014 23:29:31 -0500 Received: by mail-oi0-f51.google.com with SMTP id g201so11392547oib.24 for ; Tue, 04 Nov 2014 20:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=apceEg9BHACjOBDVST9GMe2REZa7q7yaji7sNi2zics=; b=UwQTj0k9pug5CJ2oRVZNVby5wZ0mBXtw5+EHwYCEZRXrBeAQXrx5ZTgPc6xzNbeCF/ qEsXajJfwEQ2ickDWYG6Fj3D4gtByfpTxVkaYIkZ+sNlVo73PXwCXpVlhrKTAbhfEdDP gLARPW+bTnkK3Sxfd1OhLJuHkpvfXxOyCw3qIT2AvD22G+qUL9Xv06co7PYsgZaUhBFd LVVEZb68/b3cj+b+0axJ4jCT/pBpCBXijyLitEOg1Mo8Jt6GND2taQ2m0XHAIPMSgQRv /2IPsvaF5YwVzlm8EhPpyUMY2c6QWpfrT/xJJMtsQFO1dDVhvnaKSw2lzpghsCC5K77L 2EhA== MIME-Version: 1.0 X-Received: by 10.182.58.110 with SMTP id p14mr10374389obq.40.1415161767550; Tue, 04 Nov 2014 20:29:27 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.159.163 with HTTP; Tue, 4 Nov 2014 20:29:27 -0800 (PST) In-Reply-To: <54599A0F.2060400@sugarcrm.com> 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> Date: Tue, 4 Nov 2014 21:29:27 -0700 X-Google-Sender-Auth: rULOxv9lxSKGrLK3kE0kFu0zuec Message-ID: To: Stas Malyshev Cc: Rasmus Lerdorf , Andrea Faulds , Leigh , Robert Stoll , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Types on the right or on the left From: levim@php.net (Levi Morrison) I reformatted Stas' arguments to a form better for point-by-point discussion; I'm sorry if I lost too much information when doing so. 1) It's more "natural" to do a prefixed type. This is the same thing that I am claiming, just from the opposite viewpoint. 2) Type prefixed parameters and type suffixed returns is unprecedented, outside of Hack. C++11 adds suffixed types for returns despite having prefixed types for everything else, including previous return types. 3) Claiming compatibility for things which aren't proposed is meaningless. People have already asked for support for static return types; doing ` "function" "( ")` would then be ambiguous. This is not some pie-in-the sky issue. I understand why people might think that compatibility for generics is meaningless, and can respect that (however, C++ templates and Java generics are not good examples of how things work, but I see no point in discussing it in this context; message me off-list if anyone is interested in talking about it). Once again I apologize if I haven distilled Stas' arguments incorrectly. ----- In summary, and relevant to the point of the original discussion: prefixed return types are just not possible if we want to support 'static' return types and keep the ability the current search semantics for function declarations. Or rather, nobody has proposed something that would work for both outside of what I am suggesting in the return type RFC.