Hi all,
https://bugs.php.net/bug.php?id=70549
It seems this is better to be fixed in near future.
Let "new" be associative? Currently, it's syntax error.
Was there discussion for this with
https://wiki.php.net/rfc/uniform_variable_syntax ?
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net
Hi Yasuo,
Yasuo Ohgaki wrote:
https://bugs.php.net/bug.php?id=70549
It seems this is better to be fixed in near future.
Let "new" be associative? Currently, it's syntax error.
Was there discussion for this with
https://wiki.php.net/rfc/uniform_variable_syntax ?
I think that we should keep new
working the way it does. While some
other languages do make new Foo->bar
be (new Foo)->bar
, I don't
think that's very intuitive. The whitespace between new
and the class
name has made me always read it as new (Foo->bar)
instead. Continuing
to require brackets here will mean people don't misinterpret it.
Also, as Nikita noted, there might be compatibility issues.
Thanks.
--
Andrea Faulds
http://ajf.me/