Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71530 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67127 invoked from network); 24 Jan 2014 20:50:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 20:50:27 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.172 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.172 mail-lb0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:36934] helo=mail-lb0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/29-21270-012D2E25 for ; Fri, 24 Jan 2014 15:50:26 -0500 Received: by mail-lb0-f172.google.com with SMTP id c11so2982388lbj.3 for ; Fri, 24 Jan 2014 12:50:21 -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=WAIQjQc+lN2hTxjzjqKgok+Hredgyxcsy/cw5ErGNPY=; b=zT2u6whvHu3kamoKo8lRzjg88ZHwENdT99BNrYi5Z5A7yYLKn6QMjQXV8K0qRQf2Eb 5IDym/WRCehnx6gccgYBV2kCRH9ZzMfljNNOO7GoUlvFZldTlKlauhlvvT14Mav9q1uR taZhACEHieXYyExP2WSu65meGKZiWsRlnkyI26yn610Ztld5/ar9OSo0hKh8iGv1qCBH xcx+1qJFYGr4Vkalca5HgwZ/byS/LxeIPPaYEEGybCsc9Ex70Zw6/nKfZhnOMK21CBeG UHs2ncbHS14EgsHei0I2WsM26HQ7DfBXyYl2dm+mVSwp2UguuV8lsIK/zDx5F8URcr37 iRGQ== X-Received: by 10.152.19.170 with SMTP id g10mr10333159lae.9.1390596621117; Fri, 24 Jan 2014 12:50:21 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.132.134 with HTTP; Fri, 24 Jan 2014 12:49:41 -0800 (PST) In-Reply-To: <52E2CF2F.8080202@garfieldtech.com> References: <7E.A3.39789.25841E25@pb1.pair.com> <12.A5.39789.B7851E25@pb1.pair.com> <52E16E01.7070401@gmail.com> <52E1BDB0.6050406@garfieldtech.com> <52E2CF2F.8080202@garfieldtech.com> Date: Sat, 25 Jan 2014 05:49:41 +0900 X-Google-Sender-Auth: fBYoCsD96u-XBzT-YJajUCwx-jA Message-ID: To: Larry Garfield Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e01493f64a0aeb204f0bd81db Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: yohgaki@ohgaki.net (Yasuo Ohgaki) --089e01493f64a0aeb204f0bd81db Content-Type: text/plain; charset=UTF-8 Hi Larry, On Sat, Jan 25, 2014 at 5:38 AM, Larry Garfield wrote: > > 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. >> For example, I'm about to add new session function named >> >> string session_create_id([string $prefix]) >> >> for user save handlers, so that user could generate secure ID >> easily. It's a straight name for session ID creation and there >> might be users using this name. >> >> Not adding any new names means not adding any new features >> nor cleanups. >> >> Regards, >> > > I don't mean "never add a function again". I mean adding functions for no > particular value other than having more of them helps nothing, and arguably > makes the situation worse. Where possible, we shouldn't be adding > yet-another-utility-function but looking to how to build more complete and > functional language capabilities and standard libraries, rather than > piecemeal addition of functions one RFC at a time. > > For your example, for instance, session handling is as of PHP 5.4 an > object. That's the cleaner way to handle it than a bunch of functions. > Can that function be better integrated into an API rather than just added > to a long list of tools? I don't know; maybe. But we should be asking > those questions, not saying "how many more ways to type strcmp() can we > introduce to confuse people." I think we have different objective. - Better PHP for *future* users. vs - Better PHP for *current* users. Both objectives are important, IMHO. My intention is to make/keep PHP attractive language to learn. We have namespace, so name collision is not much issue now a days, isn't it? I know there are many apps w/o namespace, though. There is a way to work round at least. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --089e01493f64a0aeb204f0bd81db--