Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71566 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88814 invoked from network); 25 Jan 2014 19:24:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jan 2014 19:24:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-we0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:57908] helo=mail-we0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/B0-19300-A8F04E25 for ; Sat, 25 Jan 2014 14:24:59 -0500 Received: by mail-we0-f170.google.com with SMTP id u57so3937633wes.29 for ; Sat, 25 Jan 2014 11:24:55 -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=F1OyHy81rRphDF7p7+UdrIuFkKqROehppHUoRuxuXG0=; b=L5ILe3DlRsiveL14mAxXx+dfiDO74SoWJaEx+1HpKsxhL6cDSwsC5TKkxsham1FRCH Cvv8LWc/x5yRqscSfkI250lSI0kh9PFcs6GcoJHlX8yhQZ2VKao9hJbK3CIf4qEB50iz y042WzvfH8bC4PgZtSM61COYcjbyXYD2Y4S3b0rEWaboJL0aV4g5Mn1mLVpT8IFz+ykI rA6rbAsOUBw2lq9Nj1oZ4+tT1gVXJu+tFHjfis0VXCVKvZI2atH/kHAYid+ynMZdlzA8 MYonTk6/FzwGjT1EzZ00LxfouJ2LLa5MhggMw8LMpTx25wyegu9SmL4hscfB7FqOOSAN YdTw== X-Received: by 10.194.58.132 with SMTP id r4mr16216wjq.45.1390677895730; Sat, 25 Jan 2014 11:24:55 -0800 (PST) Received: from [192.168.0.2] (cpc19-brig17-2-0-cust25.3-3.cable.virginm.net. [81.101.201.26]) by mx.google.com with ESMTPSA id ci4sm11821570wjc.21.2014.01.25.11.24.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 25 Jan 2014 11:24:54 -0800 (PST) Message-ID: <52E40F7E.3050001@gmail.com> Date: Sat, 25 Jan 2014 19:24:46 +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: <7E.A3.39789.25841E25@pb1.pair.com> <12.A5.39789.B7851E25@pb1.pair.com> <52E16E01.7070401@gmail.com> <52E1BDB0.6050406@garfieldtech.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: rowan.collins@gmail.com (Rowan Collins) On 24/01/2014 20:27, Yasuo Ohgaki wrote: > Hi Larry, > > On Fri, Jan 24, 2014 at 10:11 AM, Larry Garfield wrote: > >> On 1/23/14 1:31 PM, Rowan Collins wrote: >> >> Therein lies the whole problem with adding more aliases - it just makes >>> things more inconsistent, as developers can use (deliberately or >>> accidentally) different names for the same function. >> Agreed. Simply aliasing a bunch of functions offers no useful value, but >> does increase confusion. ("Wait, do I use strcmp() or string_compare() on >> this project? What version are we on again? Oh, look, this library uses >> both. Must have been different devs. FML.") >> >> If we're going to do anything, be aggressive and far-reaching with it. >> Build a proper language-level OOP design for string/array manipulation. >> >> We have enough functions lying about. Don't add more. > > We should be careful choosing names. I agree. > However, not adding more function names is simply impossible. The discussion seems to have veered off on a tangent here - we were talking about adding *aliases* (new names for existing functions) that were more consistent/standardised, and why that can cause more harm than good. Adding new functions for new functionality is an entirely different discussion. In general, I do feel that piecemeal additions like array_column() have a rather marginal benefit, and it would be nice if more parts of the standard library used OOP or at least namespaces, but having a rich standard library of functions is definitely a good thing. The password_* functions, for instance, are an excellent thing to have standardised and ready "out of the box". But that's all completely beside the point in a discussion about giving existing functions new names. Regards, -- Rowan Collins [IMSoP]