Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84193 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1433 invoked from network); 2 Mar 2015 22:01:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2015 22:01:29 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-qc0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:43740] helo=mail-qc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/AF-14834-4BDD4F45 for ; Mon, 02 Mar 2015 17:01:25 -0500 Received: by qcxr5 with SMTP id r5so27293418qcx.10 for ; Mon, 02 Mar 2015 14:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=f703kzQo3j1XuGoaSpmm6AoRRUsvYzVraeXoBb6OCdI=; b=FsSzEvmnmcUtdZ4jOjlSbAj5g6oDdIFcoiezIS4J03z/THdIUGEqjyyJ37MzkRdpmh A4E/yCs5i8OCNg++jaBdIci7HwwPyS3QwY9DW/llBWJa67xRazfTV5gDaWG7oZ2E6TUQ Qk+zrHMo85Rkz1ktENnfhVzuuey+Yjrz58TQlYT4axwdD/mAS3/kaLVIftnaQl4y8ctE WtNS2ZdAAhQhtZuqrwY+CFoN/VwjB6N2KQa/qAEIx8iQArTtx4U2NyVHI5wq20O8+/s8 vd+HOvRgOhJ7w76kJ3/Entnxk4t+ua9mxhUbyb2H44pGwYXFms0TdARvs6Ri9uxpqTnf y42A== MIME-Version: 1.0 X-Received: by 10.229.207.198 with SMTP id fz6mr47563981qcb.27.1425333681923; Mon, 02 Mar 2015 14:01:21 -0800 (PST) Received: by 10.96.39.195 with HTTP; Mon, 2 Mar 2015 14:01:21 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Mar 2015 14:01:21 -0800 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Consistent function names From: pierre.php@gmail.com (Pierre Joye) On Mon, Mar 2, 2015 at 1:58 PM, Yasuo Ohgaki wrote: > Hi Pierre, > > On Tue, Mar 3, 2015 at 6:40 AM, Pierre Joye wrote: >> >> On Sun, Mar 1, 2015 at 3:29 AM, Yasuo Ohgaki wrote: >> > Hi all, >> > >> > First of all, I have no intention removing old function names. >> > >> > PHP function names are subject of critics for a long time. >> > http://www.phpsadness.com/sad/4 >> > http://www.phpsadness.com/sad/15 >> > http://www.phpsadness.com/sad/27 >> > >> > How about rename all of these functions according to CODING_STANDARD for >> > PHP7 >> > and have aliases for old names? Some names need complete rename, but >> > most of >> > them are matter of adding "_". >> > >> > Function names like phpversion(), htmlentities(), image*() shouldn't be >> > kept. IMHO. >> > (I repeat. I have no intention removing old names) >> > >> > str*() would be most difficult. How about rename all of them to str_*()? >> > and keep >> > libc compatible alias names forever? >> > >> > Thoughts? >> >> I see no gain to do that. It also won't solve the arguments order mess. >> >> The last time we discuss this topic the idea was to go for the new >> pseudo object for most scalar, something Nikita worked on with a >> prototype, allowing something like $mystring->replace(...); But adding >> name aliases only to get names_defined_correctly sounds like a bad >> move to me. > > > Sadly, this proposal only renames functions and has aliases for old names. > We may try to fix argument order mess when we have "default namespace"! > I just don't have time to do all the job at once... > > I posted [RFC][DISCUSSION] as new thread. Please look at the list of rename > candidates. I think you'll agree to rename most of them. Sorry, I do not see how a new thread helps. Namespace either. These will only be duplicated APIs for little to no gain. Existing codes won't move as they won't be compatible with 5.x. We should really consider Nikita's experiment instead,as it acutally brings some big plus. Simple aliases for the sake of having _ in the names bring nothing but confusion in my humble opinion. Cheers, -- Pierre @pierrejoye | http://www.libgd.org