Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77771 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62506 invoked from network); 3 Oct 2014 22:03:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2014 22:03:13 -0000 Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.50 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:49312] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/15-39134-02D1F245 for ; Fri, 03 Oct 2014 18:03:13 -0400 Received: by mail-la0-f50.google.com with SMTP id s18so1800316lam.23 for ; Fri, 03 Oct 2014 15:03:10 -0700 (PDT) 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=lvPuUtEABIlN/3tTesVoGeZZruc+IeC6tqyVz+xgLqw=; b=YCmdtsVvrTrbVTjeKnBt8YP4Mis7ujkIE4sDgA1nzYGwRkA72Z7gY8hKVie5Da03Ls 8uvmsju3haKJGjoPcvIlg9jrgI1yMegbHSI9uVXNdaSCPUCruFB8Dy/OhYWdT6qqAdjQ 6mDQSsdYoIqiGlCJoZwCINgJznfG5OxkzMboA3xojZcuf06kax4yjQx9LP2URHTajoBL wyYsdBBN1bKa4Fv8EU3q2hicIhIEXzd2gHVDwiTLblZoYInAFsv+OntwhBbA4d+bcVY3 5n4fXvDUOeRCagh0TbUXfm+S01Or5Xn8opxmohptHWJRdFQJ+46XO2tZMHvynJ0rGkwk uKiA== MIME-Version: 1.0 X-Received: by 10.112.26.103 with SMTP id k7mr8380403lbg.86.1412373790160; Fri, 03 Oct 2014 15:03:10 -0700 (PDT) Sender: kalle.php@gmail.com Received: by 10.112.73.97 with HTTP; Fri, 3 Oct 2014 15:03:10 -0700 (PDT) In-Reply-To: References: <42.58.10205.32DCE245@pb1.pair.com> <9B6F1F10-7B1D-4FB0-A485-4F1C6202701C@googlemail.com> Date: Sat, 4 Oct 2014 00:03:10 +0200 X-Google-Sender-Auth: T_s4NPlnlqMyf7UeHTbqKpjyZoM Message-ID: To: Arvids Godjuks Cc: Mike Willbanks , Ingwie Phoenix , Levi Morrison , Thomas Gossmann , internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [PHP7] Remove the function keyword from class methods? From: kalle@php.net (Kalle Sommer Nielsen) Hi 2014-10-03 22:00 GMT+02:00 Arvids Godjuks : > Hello internals. > > I'm firmly against removing the "function" keyword. PHP is a dynamic > language, that means that even using the latest most functional IDE's out > there, finding the implementation is not always few clicks away (PhpStorm's > "Find Usages") and you need to do a search in the project. And the only > thing, that makes it fast and easy, is the "function" keyword, because you > can do a search by "function nameISearchFor" and get a single hit. > > I'm not even mentioning the code readability... I highly doubt THAT many names properties or constants in paticular with the same name as a method, and honestly, is it that bad to get a few extra search results? I think that seems like a very thin argument against this. For readablity, the only situration I can think of that can create some fuzzy is something like this; abstract class A { b(); } Abstract class with a method and the visibility modifier omitted, looks like a function call inside a block of code but that is pretty much about it, but in a non example type of context, even that would add more readability to that fuzzy example: abstract class Driver { connect($host, $username, $password, $database); close(); } Thats for saying, I'm not against removing it, but I'm not in hugely favor for doing so either, lets call that neutral. -- regards, Kalle Sommer Nielsen kalle@php.net