On 07/17/2012 03:07 AM, Pierre Joye wrote:
> hi,
> 
> On Tue, Jul 17, 2012 at 2:12 AM, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote:
> 
>> Let's ignore empty arguments like "make[s] PHP feel modern". That aside, the
>> main argument advanced in this message makes no sense.
> 
> This idea has been proposed many times in the past and it is actually
> a very good proposal, for array, string or other types.
> 
> The only reason why it is not yet implemented is the technical
> complexity to do it. We need pseudo objects and the likes, and it is
> really not something easy to do, in an efficient enough way.

And also because most of the proposals are simply strong-typing in
disguise. If you turn scalars into objects and attach methods to those
objects are you still going to be able to call floor() on a numeric
string? This isn't as simple as people think on first glance and it
doesn't really clean up the global namespace since we still need to be
able to do type coercion which effectly implies that all scalar objects
need to include the bulk of the current set of scalar functions.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to