Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84334 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20262 invoked from network); 5 Mar 2015 11:23:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2015 11:23:00 -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 209.85.212.171 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.171 mail-wi0-f171.google.com Received: from [209.85.212.171] ([209.85.212.171:36259] helo=mail-wi0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/30-18504-49C38F45 for ; Thu, 05 Mar 2015 06:23:00 -0500 Received: by widem10 with SMTP id em10so37821705wid.1 for ; Thu, 05 Mar 2015 03:22:57 -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=01O1G25MOgILvMIPFDfgyGokh7lmHojDAX2PTL9jmkQ=; b=loO6XJikNQ11Rxm55imdfWPjE6JO0rol5wQiKcofnc4Zp4nOtQQgPwGPN1bQdSKFpU xZpg+Rdit8GxngY3RXsh7mCMKbdcpQ0gb5DjLDmj7GrvQbaiaapNi9CxcoPmB6WVnwUd 5yoZXA5fusJnPzXz+Z4+94SdEpX8WOHrstOVYG3MBW6kEJsCen5DK6QjNf5m+ePu9cYW xihLF/Y4vHDZzeTyyVJo391r0rOjDCLhL0Ru67auD4uPOWb8SqhO6PQUn61OneUvWGUP YqnXGzYq0Kd5vPbzIusEYjBaXNCRSBSM/61O3Kp43wWS/GOyceWkO9hHQofAZI5ihLWe 8GIQ== X-Received: by 10.180.218.71 with SMTP id pe7mr49484974wic.70.1425554577296; Thu, 05 Mar 2015 03:22:57 -0800 (PST) Received: from [192.168.0.159] ([62.189.198.114]) by mx.google.com with ESMTPSA id dz6sm8221567wib.0.2015.03.05.03.22.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 03:22:56 -0800 (PST) Message-ID: <54F83C4D.1020206@gmail.com> Date: Thu, 05 Mar 2015 11:21:49 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "internals@lists.php.net" References: <54F4E93C.80206@gmail.com> <54F4EBEC.2090702@garfieldtech.com> <54F4F3FC.6060501@fischer.name> <54F4FDFB.8010701@lsces.co.uk> <54F5895D.3090002@gmail.com> <554F0C3F-770F-4694-A5AB-FDC54FCCBF00@gmail.com> <1FCB68B8-3E55-4B5D-B805-9D92D848A3A1@gmail.com> <5D8591E2-5AE6-4B4C-AAE0-3D15523410AC@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Consistent function names From: rowan.collins@gmail.com (Rowan Collins) Yasuo Ohgaki wrote on 05/03/2015 09:24: > I would love to have new OO APIs for variables. I also like to write > procedural > code for simple scripts. Therefore, even if we have new OO APIs, I > would like to > improve/maintain procedural functions and make them not legacy functions. I don't see scalar methods primarily as a way to make PHP more OO (it's just syntax sugar, at the end of the day), but as an opportunity to bring in a new API with real advantages. As Jordi says in the other thread, there are other things you could improve about the array functions beyond making the argument order match the string functions. If you were to sit down and design a new set of array functions (for instance), which were a valuable replacement for the old ones, you wouldn't also need to add dozens of aliases to the old set, because your new set could have a consistent and intuitive naming and behaviour convention. Scalar methods are just one way of designing that new set of functions, but you could just make a namespace of completely redesigned functions, with deliberately new names to make it obvious which set was being used. At that point, having the aliases you're proposing would be actively harmful, because now users would have to ask (themselves/the manual/Stack Overflow) "is this the new function, or just the new name for the old function?" Regards, -- Rowan Collins [IMSoP]