Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70665 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93308 invoked from network); 16 Dec 2013 18:16:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2013 18:16:42 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:64923] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/4A-32483-9834FA25 for ; Mon, 16 Dec 2013 13:16:41 -0500 Received: by mail-wi0-f176.google.com with SMTP id hq4so2581593wib.15 for ; Mon, 16 Dec 2013 10:16:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=aLKe3TmYVlbk+/aSJTuSU3+fHwzfRSocIstw6eIxkNU=; b=YSROydCbUL7Ovv8khlhq0nE5UFkxWEYHi+RNaclATufEPMRqjVCgPp09J6Piva12wG wriRNLva0xVpA5DKWsSbaJluw2aZMpMmeufNWbOQz2adc0EpPKXJ2hUfCWl/mA+YNRzw 69tWQJJW2hZcfXjlBKGopfDlqBF/L9+dQAvIDpxEX1WZY39DjWZdApZPieMvtMZY5yNO Oe0oxByOjmrYSOyRq1UoU2z3dkC+KqnEzmidUYz5NF4GjmgvwjtVZ+hBRbS2T5t86f+w wmgq1Wufg6i3Ko6DDNOQfhBg7fRgUUgyfCl/jANOCJkhtoyyqou7P9uxRLISZ+bJHFva avXw== X-Received: by 10.194.57.243 with SMTP id l19mr8603498wjq.54.1387217798492; Mon, 16 Dec 2013 10:16:38 -0800 (PST) Received: from [192.168.0.146] ([62.189.198.114]) by mx.google.com with ESMTPSA id hv5sm28009651wib.2.2013.12.16.10.16.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 10:16:37 -0800 (PST) Message-ID: <52AF4383.3070406@gmail.com> Date: Mon, 16 Dec 2013 18:16:35 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <52ABFE84.8010404@cerny-online.com> In-Reply-To: <52ABFE84.8010404@cerny-online.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Flexible function naming From: rowan.collins@gmail.com (Rowan Collins) Robert Cerny wrote (on 14/12/2013): > When a PHP code base is growing over time it looks more and more > 'diverse', because of inconsistent function and method naming in core > PHP and third party libraries This comes rather close to ignoring one of the pieces of advice on "The Mysterious PHP RFC Process and How You Can Change the Web" [1] which is linked to from the RFC HowTo on the PHP wiki [2]: > Don't start an RFC (or mail list discussion) about standardizing PHP function names and function argument orders We all know that PHP's core functions are drastically inconsistent, but you need to be very sure you have a new and simple approach to solving that problem before expecting much enthusiasm for it. > It should be possible to use 'array_key_exists', 'arrayKeyExists' or > 'arraykeyExists'. This looks to me like making the language *more* inconsistent, not less. Why should different projects be able to call the same built-in function by different names? If you're thinking more of third-party code not having matching coding conventions, then you might be interested in the work of the Framework Interoperability Group [3] who are aiming to agree a set of voluntary standards for just this kind of thing. That doesn't need any changes to the core language, just for framework and library authors to use an agreed set of conventions. [1]: https://blogs.oracle.com/opal/entry/the_mysterious_php_rfc_process [2]: https://wiki.php.net/rfc/howto [3]: http://www.php-fig.org/ Regards, -- Rowan Collins [IMSoP]