Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63948 invoked from network); 24 Jan 2014 20:38:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2014 20:38:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; 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:35055] helo=out4-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/78-21270-23FC2E25 for ; Fri, 24 Jan 2014 15:38:12 -0500 Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id A2F7620EE6 for ; Fri, 24 Jan 2014 15:38:08 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Fri, 24 Jan 2014 15:38:08 -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=DcAwB587SSjgk291RWcV6z mUgoE=; b=XeXsRsdVijaa2cX8ovB/yg0Jcdl6Y88rLp9kv0yTaLdYtoms1ZT1r/ a2EGCQzkVXwb1knfgn0pLJj6J2xe7S9hmT0jyDn82QA12kK20JYsHo8YddgkADFB k/lG191g/x2ITRndKp35lukdAXWuVFbyX76UHku2ygcfSdVVy0y3U= X-Sasl-enc: FK00IN5fLKauVxGz+CDpRT225b1MNVUjA0iu25SmKQ+O 1390595888 Received: from Palantirs-MacBook-Pro-2.local (unknown [63.250.249.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 55FCEC00E8A for ; Fri, 24 Jan 2014 15:38:08 -0500 (EST) Message-ID: <52E2CF2F.8080202@garfieldtech.com> Date: Fri, 24 Jan 2014 14:38:07 -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> <52E1BDB0.6050406@garfieldtech.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP6] Function name consistency From: larry@garfieldtech.com (Larry Garfield) On 1/24/14 2:27 PM, Yasuo Ohgaki 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." --Larry Garfield