Re:Upcoming changes in PHP 7.1
by jonhohle on Monday May 23, 2016 @02:49PM
(#11755930)
From a grammar perspective, it seems odd to declare property types as prefixes instead of matching the return type syntax. Were suffixed types considered?
[ Parent
| on HN ]
Re:Upcoming changes in PHP 7.1
by TazeTSchnitzel on Monday May 23, 2016 @04:04PM
(#11756482)
Well, we don't use suffixes for parameter types:
public function __construct(string $name, int $age, bool $isEmployee);
And all other qualifiers (`static`, `public`/`protected`/`private`) come before the property name, so why should the type be any different?Hack doesn't do this either.
I do think the idea came up.