Re: Consistent function names

From: Date: Sun, 01 Mar 2015 17:22:05 +0000
Subject: Re: Consistent function names
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-84110@lists.php.net to get a copy of this message
On 1 March 2015 15:18:09 GMT, "S.A.N" <ua.san.alex@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. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#84110) next »