Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84140 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6216 invoked from network); 2 Mar 2015 02:20:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2015 02:20:17 -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.192.48 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.48 mail-qg0-f48.google.com Received: from [209.85.192.48] ([209.85.192.48:45578] helo=mail-qg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/D3-17251-0E8C3F45 for ; Sun, 01 Mar 2015 21:20:17 -0500 Received: by mail-qg0-f48.google.com with SMTP id q107so11476000qgd.7 for ; Sun, 01 Mar 2015 18:20:14 -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=Wi+j01wSRaBiilXJdamsg7c89yx4v7lUrBRBc0AUkt4=; b=hGo6wFHy7yBW9696jwYxaXraimN+D7ox+QTRSHq1k02WI1t+dGB+1WiWsQlSyj4tq5 LoLXRoNDUF5TMszQ0av3pgZMuOXWuK1csSh8x+JHFDj7s1hhAtOiBuTGcHEdIr7v5bFJ 2NrPZExR4I6ds/zW4maUSpMVZmo/A9duSHDpnda9xCyvnkv73aNSGsI5+djrVguELZIX WaCI89CLowhiFh8FFPs60cb0BOBKETo2PODklbj46q27JKWW14LfXcMxOCaPkmgEgjf4 Bwniw0WX6kfi0lYjQro/UGtxpXccOst4LUi1+8QTfdOVtPoLY6txiKXRVxw39F0VcFrA SWxQ== X-Received: by 10.140.195.5 with SMTP id q5mr48747660qha.58.1425262813942; Sun, 01 Mar 2015 18:20:13 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.229.198.8 with HTTP; Sun, 1 Mar 2015 18:19:33 -0800 (PST) In-Reply-To: <61461C0A-4C91-4114-BC71-EF5E743FEBEF@gmail.com> References: <5E7DF0C5-BCB4-432A-A876-A5057FEBFBB5@gmail.com> <54F320E9.5000706@fischer.name> <61461C0A-4C91-4114-BC71-EF5E743FEBEF@gmail.com> Date: Mon, 2 Mar 2015 11:19:33 +0900 X-Google-Sender-Auth: Fsxa0ssdvbem31vRwQs64K6IShk Message-ID: To: Rowan Collins Cc: "S.A.N" , Markus Fischer , internals Content-Type: multipart/alternative; boundary=001a11433500bc9a63051044db22 Subject: Re: [PHP-DEV] Consistent function names From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11433500bc9a63051044db22 Content-Type: text/plain; charset=UTF-8 Hi Rowan, On Mon, Mar 2, 2015 at 2:22 AM, Rowan Collins wrote: > On 1 March 2015 15:18:09 GMT, "S.A.N" wrote: > >Maybe better implement for method calls on primitive types in PHP 7? > >https://github.com/nikic/scalar_objects > > We'd have a whole bunch of tough decisions to make - does HTML escaping > really belong as a method of the string type? What are printf and scanf > methods of? Etc > > Without the ability for a user to patch the existing type (a major > departure from current classes), you basically still have a bunch of > function aliases. What motivation would there be to change dozens of > instances of strpos($a, $b) to $a->indexOf($b)? > > In this respect, some version of UString makes more sense, because (if > well-defined) it actually gives users some advantage over the current > functions. I agree. We may improve "string" as well, but comprehensive UString implementation would be better. Regardless of new APIs for strings, old string APIs will remain and other APIs remain. We are better to clean up anyway, IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11433500bc9a63051044db22--