Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78261 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51484 invoked from network); 23 Oct 2014 08:23:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2014 08:23:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.212.174 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:64725] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/41-41150-AFAB8445 for ; Thu, 23 Oct 2014 04:23:22 -0400 Received: by mail-wi0-f174.google.com with SMTP id q5so40357wiv.13 for ; Thu, 23 Oct 2014 01:23:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=TgIKfBKv1uyWj2B/a1xn09SeVQWAlRMwKFTkJMc3OQY=; b=jtLUhUzS2mGBJ0tjxpVWfpdwwLJuZWKrlAq/EN4Nh5TeJ/nv6QHzC6PwhZsWiEIF5T Pvioz6OCXMamtM8Nmjwzu3OK3580G1dOZ1atebTUM0fnjlCDGgDzVaWaF2430J6rp2db o6a5I1GPvPSv+tqnBs7HTurZnE2KlWRwP6miNHgpI6z8WjTY05qvXVrP30XjW+uuKfKm VVZUBTp/6SHtTH2V7WsCk0sZ1i3EyW3VoEe36n3aggSh8qGobDYx1iI6lP7/7qqS0vlo f7AxuhkUBxb2Nzj/64MdrkPkPQCctikBXMDaEtUugw7Iw//QpKaDjzQUhYsAc6HJS68E b7cA== X-Gm-Message-State: ALoCoQmrsOzTSXsJFho9b+QXTWi23MljFdQ+u3wsRZtdOmU0ygOhcoOt6MyFwK1PgYEfBeTmfIKi X-Received: by 10.194.61.208 with SMTP id s16mr3621188wjr.104.1414052599982; Thu, 23 Oct 2014 01:23:19 -0700 (PDT) Received: from [192.168.1.67] (host86-136-245-20.range86-136.btcentralplus.com. [86.136.245.20]) by mx.google.com with ESMTPSA id ce1sm1313291wjc.2.2014.10.23.01.23.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Oct 2014 01:23:19 -0700 (PDT) Message-ID: <1414052597.2624.44.camel@localhost.localdomain> To: Stas Malyshev Cc: "internals@lists.php.net" Date: Thu, 23 Oct 2014 09:23:17 +0100 In-Reply-To: <544697DA.6010506@sugarcrm.com> References: <1413875212.2624.3.camel@localhost.localdomain> <544697DA.6010506@sugarcrm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] UString From: pthreads@pthreads.org (Joe Watkins) On Tue, 2014-10-21 at 10:28 -0700, Stas Malyshev wrote: > Hi! > > > https://wiki.php.net/rfc/ustring > > > > This is the result of work done by a few of us, we won't be opening any > > vote in a fortnight. We have a long time before 7, there is no rush > > whatever. > > Couple of thoughts: > - I like the idea of having a unicode string class. May be a way to > figure out the right way to do it without messing up the whole core. > > - I wish there were more description of which API this class provides. > If it's planned to be direct copy of UnicodeString, some of the > operations there are not how PHP strings usually work (i.e. in-place > modification) and it's not really enough to make it useful - e.g. what > if I need to do regexps on it, for example? Or does it cover whole > mbstring API too? What about something mbstring doesn't cover, like > ucfirst or strrev? API on github in readme. Regexp not covered yet, ICU has a nicer Matcher/Pattern API like Java's, I'm not sure what to do there, an ICU based API could certainly be introduced. > > - Do we really need different encodings, different backends and so on, > internally? Note that each backend has its own quirks, limitations and > bugs, and there's nothing worse than dealing with unpredictable set of > dependencies. The user cares what they send into the class and what > comes out, but very rarely they care what happens inside - why not just > do it one way everywhere? > No, actually, I don't think we do. It was over complicating something simple, so I removed the backend abstraction and will work towards solving the rest too. We'll use ICU, because battle tested like nothing else, and keeps everything simple ... it doesn't make sense to introduce a possibly unstable and as you rightly say different API with it's own quirks. Cheers Joe