Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16818 invoked from network); 4 Oct 2014 06:51:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Oct 2014 06:51:32 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.54 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.54 mail-qg0-f54.google.com Received: from [209.85.192.54] ([209.85.192.54:42118] helo=mail-qg0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/30-11734-3F89F245 for ; Sat, 04 Oct 2014 02:51:32 -0400 Received: by mail-qg0-f54.google.com with SMTP id z107so1849330qgd.41 for ; Fri, 03 Oct 2014 23:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7hT6X4D9Lo6TOfLRFlHgQoEff5DWkW/cFhySQ9469rY=; b=XsWOzkaHurqbuumYXwUj2vwWLqfCiqZ17CRauKPyarJ9XJh4qcyN2Bi4voFiOllLq1 2q/jxd4O2385SRBOs26StN0bXhVvc7vR5+4I7UeHeVbw41moYpN51XO5EbScFmvv5pTV SzaIGrPTLusAN1NrxkqI0Ys9oPBk2CEOCaPSh1SFdzDjlyCup8dlv1fXOHydyuR0k3Ai 3h8ld+DzTutqZvlILdWzSOUZxg2sFwnyw6xf5/4ekVsEZSFeHhR2TyF6HwxXbJIa2pyu 3csLzuwoxOycNT0KkV+CmZNtp5Mg8jyyy2lH3TpchPwEh8ib1IKHqrLfkkrjTDHbYqEZ KKdw== MIME-Version: 1.0 X-Received: by 10.224.16.147 with SMTP id o19mr13656729qaa.87.1412405480494; Fri, 03 Oct 2014 23:51:20 -0700 (PDT) Received: by 10.140.22.51 with HTTP; Fri, 3 Oct 2014 23:51:20 -0700 (PDT) Received: by 10.140.22.51 with HTTP; Fri, 3 Oct 2014 23:51:20 -0700 (PDT) In-Reply-To: References: <42.58.10205.32DCE245@pb1.pair.com> Date: Sat, 4 Oct 2014 08:51:20 +0200 Message-ID: To: Andrea Faulds Cc: Thomas Gossmann , PHP internals Content-Type: multipart/alternative; boundary=047d7bf0cf44f1ae0a05049346e9 Subject: Re: [PHP-DEV] [PHP7] Remove the function keyword from class methods? From: pierre.php@gmail.com (Pierre Joye) --047d7bf0cf44f1ae0a05049346e9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Oct 4, 2014 4:01 AM, "Andrea Faulds" wrote: > > > On 3 Oct 2014, at 17:21, Thomas Gossmann wrote: > > > I was wondering if it is possible to deprecate/remove the function keyword from class methods in php7 or at least make it optional when one of the visibility keywords is present? > > > > I feel like writing a completely unnecessary keyword each time I write a new method for a class. > > > > I guess this was a discussion earlier, though I wasn't able to find anything about it. Would love to hear, what pdt-internals (re-)think about that topic. > > Me and Pierre have discussed this before, Pierre was in favour of it last time we talked about it. I=E2=80=99d certainly be in favour of allowing `fu= nction` to be omitted when there=E2=80=99s a visibility specifier, like so: > > public foo() {} > public static foo() {} > > Easy to implement, too. What are the list=E2=80=99s thoughts? I don=E2=80= =99t think it really hampers readability much. Same here. Also while not being against that, I am not a fan or removing things that make hard to have code for 5.x and 7.x. That will make migrations harder for little to no gain. Did we not have a rfc about that already? --047d7bf0cf44f1ae0a05049346e9--