Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22783 invoked from network); 3 Oct 2014 20:04:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2014 20:04:59 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.50 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.218.50 mail-oi0-f50.google.com Received: from [209.85.218.50] ([209.85.218.50:33220] helo=mail-oi0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 48/D4-10205-A610F245 for ; Fri, 03 Oct 2014 16:04:59 -0400 Received: by mail-oi0-f50.google.com with SMTP id i138so1276247oig.37 for ; Fri, 03 Oct 2014 13:04:56 -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=J5PUVj+TzexzUv9Qw9G/xW1AQJmleQbjrUy1bpVHYLs=; b=QY/20jc50S+jeVg3U520cUCJt0SP6WYkXVTC8FZFcUCO7XdNcZ2WdvkiYVprAoHkMV 9JGvi86ohP75hcn2uvtYZPOsIBR4auHMB9TtQuOL+EV7lgh18EDYScTn+B1VlIMMorPI 6sCgh5FmmCfLTiXJOOuarhAPML77K6wzTLYIgtOijFu0fkdig/GtzLNLKJyIbwuLjXBF t0VNUtOL/oc5u1o285o5nKwChFfSzfxp2yjeM9qT38J/jmUIWKSXXZ2A29Lcsa/U8I38 CUvOzl77KnqdXzFQosHDyCEy8xSLU5n0K+q9wyfbyNlMlVQYB9ZW0kG91Vapi0dHszdR zlHw== MIME-Version: 1.0 X-Received: by 10.60.103.13 with SMTP id fs13mr9837260oeb.48.1412366696363; Fri, 03 Oct 2014 13:04:56 -0700 (PDT) Received: by 10.202.227.206 with HTTP; Fri, 3 Oct 2014 13:04:56 -0700 (PDT) In-Reply-To: References: <42.58.10205.32DCE245@pb1.pair.com> <9B6F1F10-7B1D-4FB0-A485-4F1C6202701C@googlemail.com> Date: Fri, 3 Oct 2014 13:04:56 -0700 Message-ID: To: Arvids Godjuks Cc: Mike Willbanks , Ingwie Phoenix , Levi Morrison , Thomas Gossmann , internals Content-Type: multipart/alternative; boundary=089e0112c4083abd4305048a3f20 Subject: Re: [PHP-DEV] [PHP7] Remove the function keyword from class methods? From: kris.craig@gmail.com (Kris Craig) --089e0112c4083abd4305048a3f20 Content-Type: text/plain; charset=UTF-8 On Fri, Oct 3, 2014 at 1:00 PM, Arvids Godjuks wrote: > 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... > While there are reasonable arguments to be made for removing it, I agree that it would create more problems than it would solve. Specifically, one of the things I've always liked about PHP is that I can always track down a particular method declaration in a codebase by simply doing a grep for the word "function" preceding the name. If it's defined in that codebase, it'll come up. Even making the keyword optional would eliminate that certainty and make it that much more difficult to navigate an unfamiliar codebase. --Kris --089e0112c4083abd4305048a3f20--