Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71651 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37960 invoked from network); 28 Jan 2014 00:34:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jan 2014 00:34:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.177 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.177 mail-lb0-f177.google.com Received: from [209.85.217.177] ([209.85.217.177:53032] helo=mail-lb0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/75-01140-9FAF6E25 for ; Mon, 27 Jan 2014 19:34:02 -0500 Received: by mail-lb0-f177.google.com with SMTP id z5so4909332lbh.8 for ; Mon, 27 Jan 2014 16:33:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=rZYSNOzVdUPk3zgLaiwvs66gbik73ohs7UTsJpD7cKA=; b=W25K069PRkXOoPyc7HVEsA2Av7Hc9S2XvKhcM2QQ4KNwc2jdaPze4fCmlJRqgVW4B/ ZY+FZT9cQStQKtIomVKfKt5wKiPgpvdob1KTrcsr/fUAzTB+SnPrrx5ryUyRPZCeTbNT WUqQwv3b9/Fg2WWRKDOPoSKa7NrUmGKla0ZewoqHqRFP5CQ901fAmkV2yw0I3ii1T4wr KMo5rQ/HjFWYta9AQmOcrpmLd/HaHQvQg6rL1TCuhuXU1KU90zaV3TCz4yazq6aRyHmY GR3VPMvWnjEjdogN/Aw+f7SFTdeXfE34dxLQ1abTmJBLUJOPeBrA+pkenQyTuiiG10Ac alHA== X-Received: by 10.153.8.225 with SMTP id dn1mr19279383lad.17.1390869238906; Mon, 27 Jan 2014 16:33:58 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.132.134 with HTTP; Mon, 27 Jan 2014 16:33:18 -0800 (PST) In-Reply-To: <52E6A1CA.60808@gmail.com> References: <7E.A3.39789.25841E25@pb1.pair.com> <12.A5.39789.B7851E25@pb1.pair.com> <52E16E01.7070401@gmail.com> <52E1BDB0.6050406@garfieldtech.com> <52E40F7E.3050001@gmail.com> <52E5563A.4070701@gmail.com> <52E6A1CA.60808@gmail.com> Date: Tue, 28 Jan 2014 09:33:18 +0900 X-Google-Sender-Auth: 2OWj7OPzjkIF6wq1gaCDWeQ-6AA Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1136dfc6ea042804f0fcfa17 Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1136dfc6ea042804f0fcfa17 Content-Type: text/plain; charset=UTF-8 Hi Rowan, On Tue, Jan 28, 2014 at 3:13 AM, Rowan Collins wrote: > > IMHO, aliases would not affect readability. Users would understand what >> >> word_wrap() and wordwrap() >> htmlspecialchar and html_special_chars() >> and so on >> >> means. >> > > But they might wonder if there was a difference between them, particularly > if the aliases are more distinct (e.g. count() vs sizeof()). > > I agree. Completely different name could be pain. > > I agree that automatic aliasing would not be good. >> String and array function names needs more discussion. >> GD function names may be aliased automatically, for example. >> >> We should discuses if we are going to add standard name aliases >> to module functions or not, perhaps? >> > > Yes, I think per-module / extension is the way to go - as with the pg_* > functions you mentioned earlier. > > It can then be proposed that a certain module be converted to OO (as > happened with DateTime), another tidied up to have a consistent naming > structure, and another left alone until more "interesting" changes are > being made to it. String and array function alias discussion would be difficult to reach a consensus. Let's separate discussion and concentrate module function at first. We have new function "apache_request/response_headers" and "getallheaders" in "CLI" server. const zend_function_entry server_additional_functions[] = { PHP_FE(cli_set_process_title, arginfo_cli_set_process_title) PHP_FE(cli_get_process_title, arginfo_cli_get_process_title) PHP_FE(apache_request_headers, arginfo_no_args) PHP_FE(apache_response_headers, arginfo_no_args) PHP_FALIAS(getallheaders, apache_request_headers, arginfo_no_args) {NULL, NULL, NULL} }; We should avoid these kind of naming also. I'll check modules and list candidates in the RFC. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1136dfc6ea042804f0fcfa17--