Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50632 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67688 invoked from network); 27 Nov 2010 17:54:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Nov 2010 17:54:38 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain prohost.org designates 209.85.161.42 as permitted sender) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:44127] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/B6-32860-AD541FC4 for ; Sat, 27 Nov 2010 12:54:37 -0500 Received: by fxm11 with SMTP id 11so2326642fxm.29 for ; Sat, 27 Nov 2010 09:54:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.53.68 with SMTP id l4mr3426971fag.44.1290880471461; Sat, 27 Nov 2010 09:54:31 -0800 (PST) Received: by 10.223.20.20 with HTTP; Sat, 27 Nov 2010 09:54:31 -0800 (PST) In-Reply-To: <1290879624.7033.826.camel@guybrush> References: <1290879624.7033.826.camel@guybrush> Date: Sat, 27 Nov 2010 12:54:31 -0500 Message-ID: To: =?ISO-8859-1?Q?Johannes_Schl=FCter?= Cc: PHP internals list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Making T_FUNCTION optional in method declarations From: ilia@prohost.org (Ilia Alshanetsky) As long as a modifier (public|private|protected) is still required, +1. 2010/11/27 Johannes Schl=FCter : > Hi, > > every now and then while writing classes I forget to add the "function" > keyword between my visibility modifier and the method name in a class > declaration. I don't think it is required for readability and it is not > needed by the parser to prevent conflicts, I therefore propose the > following RFC incl. patch to allow writing > > =A0 =A0 =A0 =A0class Foo { > =A0 =A0 =A0 =A0 =A0 =A0public bar() { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0echo "Hello World"; > =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} > > Without T_FUNCTION token. In my opinion an access modifier /public, > private protected, static, final) should still be required for keeping > readability. > > RFC: http://wiki.php.net/rfc/optional-t-function > Patch: http://schlueters.de/~johannes/php/zend_optional_t_function.diff > > johannes > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >