Hi Rowan,

On Mon, Mar 2, 2015 at 2:22 AM, Rowan Collins <rowan.coll...@gmail.com>
wrote:

> On 1 March 2015 15:18:09 GMT, "S.A.N" <ua.san.a...@gmail.com> 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
yohg...@ohgaki.net

Reply via email to