Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86982 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86288 invoked from network); 1 Jul 2015 05:36:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2015 05:36:55 -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.160.176 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.160.176 mail-yk0-f176.google.com Received: from [209.85.160.176] ([209.85.160.176:35681] helo=mail-yk0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/E1-06060-47C73955 for ; Wed, 01 Jul 2015 01:36:53 -0400 Received: by ykdy1 with SMTP id y1so29740853ykd.2 for ; Tue, 30 Jun 2015 22:36:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=JTk33402lEFsqrJxScx3XDESK2T4zu5QcZmJf+Fh7p8=; b=FIZVOcd2gblfN4H+B93i3LM51/+FYg4fhgOwuxRgyIiRc8RyJ/kvqtOPfWanRvbDrj eYHl1ak5YDu7Xabnac8YMH3jZ38t7QgTVL3JP+9th/tdyFiJu8iB3xHgcBoC4/IGGnvP 4VwT+CBPuvkAszAbhl6gkJIuL2aUGFBObxP9+8U2vffUBuA9mGCU/FXDb4TyupjL7NXj nIXV3hTm5GkOX/R3Gw8ezVftW7z8tbkAedYukrlyVf6NoKIG0xWbjOWLM7aI0asTQ0vl lGC/1p/28N9a0msVN9ieVZDsZ/ueCEXkaQ3pxbG5bsZcDkWN0+U3rLblsxm5TzyqKvG/ XM3w== X-Gm-Message-State: ALoCoQkOCBOLbzF5VTkEc6qCeHZJWxUsUI+pEzzyU/Xon8QoBZvTMvC1mrrDDj9pmXHYB8YQtzEY MIME-Version: 1.0 X-Received: by 10.13.226.145 with SMTP id l139mr28066889ywe.67.1435729009949; Tue, 30 Jun 2015 22:36:49 -0700 (PDT) Received: by 10.129.72.149 with HTTP; Tue, 30 Jun 2015 22:36:49 -0700 (PDT) X-Originating-IP: [217.39.106.89] In-Reply-To: References: <1413875212.2624.3.camel@localhost.localdomain> Date: Wed, 1 Jul 2015 06:36:49 +0100 Message-ID: To: Sara Golemon Cc: Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary=001a114fc2b4a1f00b0519c9b54a Subject: Re: [PHP-DEV] [RFC] UString From: pthreads@pthreads.org (Joe Watkins) --001a114fc2b4a1f00b0519c9b54a Content-Type: text/plain; charset=UTF-8 Morning Sara, > Curious what the current state of the UString RFC is. I've got a > functionality request for HHVM to wrap icu::UnicodeString and was > hoping to match PHP behavior if any plans had been made, and lo... > here's a plan! I was (semi) convinced by Dmitry that the superior implementation is one for Zend, so I backed off ... > I think (hope) that Joe's intention was to make it as an extension for > proof of concept, but make it part of the intl extension when it comes > to full adoption by the runtime. If not, let's talk about making that > the intent, because intl is where this belongs. The folder the source code is in makes no nevermind, the real issue with integration is changing all of intl, and lots of other stuff, to accept UString, since casting to basic type , while acceptable for simple tests, would get extremely wasteful for an application of any complexity. Another possible issue is engine integration: $string = (UString) $someString; $string = (UString) "someString"; These aren't very different to 'new UString', but for an integrated solution, kind of expected to work. I don't know what the solutions are to these problems, I'm all ears ... Cheers Joe On Wed, Jul 1, 2015 at 12:30 AM, Sara Golemon wrote: > On Mon, Mar 2, 2015 at 12:48 AM, Nikita Popov > wrote: > > On Tue, Oct 21, 2014 at 9:06 AM, Joe Watkins > wrote: > >> 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. > >> > >> Now seems like a good time to start the conversation so we can > >> hash out > >> the details, or get on with other things ;) > >> > > > Curious what the current state of the UString RFC is. I've got a > functionality request for HHVM to wrap icu::UnicodeString and was > hoping to match PHP behavior if any plans had been made, and lo... > here's a plan! > > > I'm not totally convinced by this proposal. We already have quite a > number > > of extensions that deal with unicode text in one way or another (at least > > intl, mbstring and iconv). This adds yet another way of dealing with this > > issue - a way that will have to be combined with at least two other > > extensions (mbstring or iconv for input handling and conversion) and intl > > for any non-trivial operations. There's nothing wrong with adding another > > approach for unicode handling per se, but I'd like to have more empahsis > on > > how this integrates with existing functionality and why it is implemented > > separately from it (especially intl), etc. > > > I think (hope) that Joe's intention was to make it as an extension for > proof of concept, but make it part of the intl extension when it comes > to full adoption by the runtime. If not, let's talk about making that > the intent, because intl is where this belongs. > > For my bikeshedding part, I'd recommend against the u() function > helper as it pollutes the global function namespace and takes a very > fundamental name. intl\u() might be worth considering, but we'll need > to have a discussion about namespacing for the intl extension as a > whole (separate topic). > > I'd also recommend "IntlString" rather than "UString" as nearly all > the Intl classes follow this convention. The one notable exception > being UConverter (which yes, I added, and I regret the departure in > naming). > > Otherwise, while there's room to quibble about specific API names and > arguments, the general concept seems a no-brainer. > > -Sara > --001a114fc2b4a1f00b0519c9b54a--