Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65990 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32390 invoked from network); 19 Feb 2013 19:12:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 19:12:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.49 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.215.49 mail-la0-f49.google.com Received: from [209.85.215.49] ([209.85.215.49:52697] helo=mail-la0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/86-17768-5AEC3215 for ; Tue, 19 Feb 2013 14:12:37 -0500 Received: by mail-la0-f49.google.com with SMTP id fs13so6782620lab.8 for ; Tue, 19 Feb 2013 11:12:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=W7SjAdbrv7TTJXviSiJ43uu7Na8sdSCRCEx/GVPTvy0=; b=ttvT7sN1gygjPL7PW3pz1H5u7vCfCK/U/FDFk0HccneSFLVsgySV+OqDewtMy6id76 JSQo0QvkgPE7V8mOGSthAKiPkyEkWv/3AMPgXEwW7sxHRUv8EpFnYottiPVp8C1vu1Ek XQVKPpmNQ5fDknPYB4vx8ND8hKUOuDiaLeIRzUqBMUBbWdpqka9PBrgNLNOn6Y8dbExE sWfEhadfGBRMdhwlzI8bFh2AxnrSl6RBTcGYusIeK16HsE2r+6UrMkqHPt3Ou7u6XgDq g10kod4caHcBctlPGbtsH6WxIx4Usj7pfTlfLqbXiZzLo2rQ6nwFhPotBcEL9f0GvGg8 F6og== X-Received: by 10.112.49.99 with SMTP id t3mr7744035lbn.108.1361301154170; Tue, 19 Feb 2013 11:12:34 -0800 (PST) Received: from nikita2206-debian (37-144-174-250.broadband.corbina.ru. [37.144.174.250]) by mx.google.com with ESMTPS id w5sm15829820lbj.15.2013.02.19.11.12.32 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 19 Feb 2013 11:12:33 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Rasmus Lerdorf" Cc: "Christopher Jones" , "internals@lists.php.net" References: <5123BE51.7060500@oracle.com> <5123CE1E.5020500@lerdorf.com> Date: Tue, 19 Feb 2013 23:12:31 -0000 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <5123CE1E.5020500@lerdorf.com> User-Agent: Opera Mail/12.14 (Linux) Subject: Re: [PHP-DEV] Dropping requirement for `function` keyword for methods in classes/interfaces/etc From: inefedor@gmail.com ("Nikita Nefedov") On Tue, 19 Feb 2013 19:10:22 -0000, Rasmus Lerdorf wrote: > On 02/19/2013 03:07 PM, Nikita Nefedov wrote: > >> Are you grepping for all the functions or you are grepping just for some >> specific function? If so, you are likely already know what visibility >> this function has, so couldn't you grep for `public %functionName%` >> instead of `function %functionName%`? >> At the end, you can always use `grep >> '(function|public|private|protected) functionName' file`, and if it's >> long to type, you can make sh script, or even alias. > > public is the default visibility so it is often left off, so no, I can't > grep for that. > > -Rasmus As Sara noted, we shouldn't let users define methods without modifiers at all, so at least public/private/protected will have to be there.