Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18733 invoked from network); 24 Jan 2014 01:11:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 01:11:16 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.28 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.28 out4-smtp.messagingengine.com Received: from [66.111.4.28] ([66.111.4.28:48329] helo=out4-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/4F-39789-3BDB1E25 for ; Thu, 23 Jan 2014 20:11:15 -0500 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 3F0F520C05 for ; Thu, 23 Jan 2014 20:11:13 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 23 Jan 2014 20:11:13 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=1pItgh7XSUJ5dEWtpbzTjr EXRuA=; b=qEzhAn78GUahumvf1xoTpUdRPf0jx9Tj8ymWRBOIZewHo/Bdk83CUL rWknnfUMmx1DJnRJM4/IhPfDYBUWa4Pp6TGNYZzcuhkmatA7WCM9kYf9YMaK7b4F wnuZIoXe6+cPE96yQ9cY3finvEIzWVyocLdTdij+VyG1F6nqeaJDo= X-Sasl-enc: 4tDVw8E9c7i1AsJy6fxSXKpbYdWxYe5TBDD8pRLT09DG 1390525873 Received: from Palantirs-MacBook-Pro-2.local (unknown [63.250.249.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 04C5BC00E92 for ; Thu, 23 Jan 2014 20:11:12 -0500 (EST) Message-ID: <52E1BDB0.6050406@garfieldtech.com> Date: Thu, 23 Jan 2014 19:11:12 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; 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> In-Reply-To: <52E16E01.7070401@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: larry@garfieldtech.com (Larry Garfield) 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. > > I still have to think a moment when I see sizeof() or print, rather than > count() or echo - let alone having to remember which version of PHP > introduced which alias so that libraries don't break when deployed to > older servers. > > I think it's far better to have replacements for whole sets of functions > that are clearly "new and shiny" - be that OO strings and arrays, or > just namespaces for extensions like mbstring. In fact, a namespace for > mbstring could allow a much cleaner version of the "override normal > string functions" system, because you could just "use" the namespace, > and have functions with overlapping names... > > Regards, > Rowan Collins > [IMSoP] 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. --Larry Garfield