Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12282 invoked from network); 4 Nov 2014 20:03:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Nov 2014 20:03:08 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.45 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.218.45 mail-oi0-f45.google.com Received: from [209.85.218.45] ([209.85.218.45:39034] helo=mail-oi0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/61-02095-9F039545 for ; Tue, 04 Nov 2014 15:03:06 -0500 Received: by mail-oi0-f45.google.com with SMTP id v63so7504216oia.4 for ; Tue, 04 Nov 2014 12:03:03 -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:content-transfer-encoding; bh=YPviwqeCXbVLX6tCnN+k3pHT29PH1RLeLdGAcMgOFBM=; b=U8IMJA8GtcGKOqogVAr748diNR2gvKdddqX7zCFmYjo3e7Cdl9fznrdFRvN+E9KYGr o0LD60cxKQ615q0+n7k8UZ74MN+VTNowQQWaFhUtimRP7oN4Vg2SUi08M0uj9qYL4Wpr xHG4JI8TJcoqO6al2Uz27QVCm0nfctTwtzHNpl42zeRjagFl00tUWvimj/1ky2VkSCUz LhdWzjrTOCWoZ2lY9UgNjpOyZuUlJJolhoPo+jDmDGZTQ+mOk4F9GdYRZheTcImF6jSm JYKgZXSuXzMOgAL36AFlnhU/IkBMj9bhCmvlPr+mYeNXOgSFEV6hXHPA44NOoKOngehh Lh3g== MIME-Version: 1.0 X-Received: by 10.202.57.7 with SMTP id g7mr1992476oia.109.1415130902273; Tue, 04 Nov 2014 11:55:02 -0800 (PST) Sender: morrison.levi@gmail.com Received: by 10.76.159.163 with HTTP; Tue, 4 Nov 2014 11:55:02 -0800 (PST) In-Reply-To: <54591F60.1010100@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> <54591BEF.6050007@sugarcrm.com> <54591F60.1010100@sugarcrm.com> Date: Tue, 4 Nov 2014 12:55:02 -0700 X-Google-Sender-Auth: qg70zw13Cic3fBYXeUWKNs_o088 Message-ID: To: Stas Malyshev Cc: Andrea Faulds , Robert Stoll , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Types on the right or on the left From: levim@php.net (Levi Morrison) On Tue, Nov 4, 2014 at 11:48 AM, Stas Malyshev wro= te: > Hi! > >> But it=E2=80=99s rather weird for closures: >> >> $foo =3D Foo function () { >> }; > > Not much weirder than: > > $foo =3D static function () { ... } > > which we already have. Putting modifiers in front of the function is > nothing foreign to PHP. This syntax is one reason that this approach is *not* taken. While this RFC does not propose or implement a return type of static, it could be done in the foreseeable future. Your proposed syntax would then be ambiguous.