What's confusing about it? Each expression means something very
different and distinct.

I use $foo(), new $foo(), classname::$foo, classname::$foo(),
$bar::$foo, $bar::$foo(), etc. on a regular basis, and it can make for
some very elegant, concise and readable code.

Moreover, this really isn't something you can just remove from the
language. There's already a fair bit of code (including my own) out in
the wild that makes use of this syntax.

-j.

On Thu, Jul 22, 2010 at 8:29 PM, Karoly Negyesi <kar...@negyesi.net> wrote:
> On Thu, Jul 22, 2010 at 4:51 PM, Davey Shafik <da...@php.net> wrote:
>> You can call classname::$foo() and even $obj->$foo() with call_user_func(), 
>> should we get rid of those too?
>
> Absolutely not.
>
>> I grant you that variable function calls are sometimes confusing, lambda 
>> functions are a better way to do it perhaps, but just because something can 
>> be abused, doesn't mean it should be removed, unless it's impeding further 
>> innovation (a la namespaced old style constructors).
>
> It's not abusing it's the horribly confusing syntax.
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
I do know everything, just not all at once. It's a virtual memory problem.
You should follow me on Twitter: http://twitter.com/jperras

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

Reply via email to