On Thu, 15 Dec 2022, Sara Golemon wrote:

> On Thu, Dec 15, 2022 at 9:34 AM Derick Rethans <der...@php.net> wrote:
> 
> > I have just published an initial draft of the "Unicode Text 
> > Processing" RFC, a proposal to have performant unicode text 
> > processing always available to PHP users, by introducing a new 
> > "Text" class.
> >
> > You can find it at: https://wiki.php.net/rfc/unicode_text_processing
> >
> > I'm looking forwards to hearing your opinions, additions, and 
> > suggestions — the RFC specifically asks for these in places.
> >

<snip>

> Question 2 is that class.  I know folks have been clammoring for a 
> `String` class for some time and this actually fills that niche quite 
> well.  A part of me wonders if we can overload it a little to provide 
> a psuedo locale of "binary" so that users can, optionally, treat it 
> like a more generalized String class in specific cases, storing a 
> normal `char*` zend_string under the hood in that case.  Possibly as a 
> specialzation tree.

An alternative could be to just have this as an implementation detail, 
in case the associated locale/collation is C/root. Then nobody needs to 
worry about it, *but* it would mean implementing everything twice. Which 
I am not too keen on, especially because we have such a wide array of 
operations on strings already.

cheers,
Derick

-- 
https://derickrethans.nl | https://xdebug.org | https://dram.io

Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support
Host of PHP Internals News: https://phpinternals.news

mastodon: @derickr@phpc.social @xdebug@phpc.social
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to