Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78264 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59148 invoked from network); 23 Oct 2014 09:42:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2014 09:42:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:44832] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/92-41150-39DC8445 for ; Thu, 23 Oct 2014 05:42:44 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so3118852wiv.15 for ; Thu, 23 Oct 2014 02:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=EdNLqNSwqjI6/EmUO011QO62B4IciZjJYuf/UDPiYQk=; b=GbXBiXAEgl9FnMnK/IoK5hAdAoL4kR9zL8vjtXY9JRis5pGhQy593kMijmieT66dgq dVIOGgTr7Ny9VSZDhZl4+4dRTo5MpTZVE8W33lVi1SL7nzIcgvoQ5FxArARIqP1+Fl4x rquS6JGcS6fQsDtgz8qZukRj5j9mqtZv0Tgdc8B8aISmEw+u6f0DmNmC4qcpgMj/6cU6 O6SZQp5aJzUFf6kbrvjw0uqUQ97ujII2ruwGex/gowiZBJQwsjWca1kb7Lh+f58a8N2M pMPPUx8+UQNBDMxeGoL4NmMJf/255Q/cBYw75pLhwxQQwCbxyF/cwJ4k1LgJeIys/ImJ wEJw== X-Received: by 10.180.107.69 with SMTP id ha5mr11373727wib.69.1414057361216; Thu, 23 Oct 2014 02:42:41 -0700 (PDT) Received: from [192.168.0.177] ([62.189.198.114]) by mx.google.com with ESMTPSA id bj7sm1506791wjc.33.2014.10.23.02.42.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Oct 2014 02:42:40 -0700 (PDT) Message-ID: <5448CD8F.8040201@gmail.com> Date: Thu, 23 Oct 2014 10:42:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <1413875212.2624.3.camel@localhost.localdomain> <5446C552.2080702@gmail.com> <1414052313.2624.40.camel@localhost.localdomain> In-Reply-To: <1414052313.2624.40.camel@localhost.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] UString From: rowan.collins@gmail.com (Rowan Collins) Joe Watkins wrote on 23/10/2014 09:18: > I'd rather higher level stuff existed at a higher level, I'd rather > solve for ustring the problems that are solved for normal strings and > leave the rest up to whatever the framework/component/library or wants > to do. It's not really higher level in terms of the problem being solved, it's the same functions applied to a higher abstraction of what "string" means. It doesn't make much sense to say that u($foo)->length "solves the same problem as" strlen($foo), but grapheme_strlen($foo) is somehow "higher level". They're three different definitions of the word "length" which can be applied to the same string, and it would be nice if they were all accessible through the same API. I get the feeling people are thinking of grapheme functions as something exotic and hard to implement, but ext/intl seems to have a very straight-forward set of functions for them: http://php.net/manual/en/ref.intl.grapheme.php The two-interfaces idea was just to get over the naming problem of prefixing everything with codePointX or graphemeX, and wouldn't actually require a separate data structure under the hood. -- Rowan Collins [IMSoP]