On 22/06/2016 10:37, Michał Brzuchalski wrote:
I may don't have voting privileges but as an 10yr PHP development practitioner I can't believe that such big and awesome feature like Typed Properties minimally can't have enought votes to be a part of PHP language (26/(26+16) = 62% and that's not enoght to 2/3+1vote).
Bear in mind that this vote doesn't mean "PHP can never have typed properties", it means that "this particular approach to adding typed properties is not considered to be the right thing to do at the present time". If the vote had been unanimously against, it would have been hard to revive the proposal, but that's clearly not the case here.
I agree that type safety would be a good direction for the language to go in, but I think we need a decent plan for how exactly that would work, rather than adding piecemeal features that introduce awkward edge cases and unintended consequences. (The restriction on referencing typed properties is my go-to example of this.)
Incidentally, a crucial difference between PHP's type hints and those in just about any other language is that they are effectively assertions - dynamic, run-time checks (and sometimes implicit coercions) - rather than static, off-line analysis. You mentioned Java, which is a compiled language so provides full type safety at compile time; Python and Hack both consider type checks as metadata used by offline analysers, and ignore it at run-time. Perl6 I think does some run-time checking, but I couldn't find any documentation explicitly laying out the principles. That gives us a unique set of problems when designing them, not least in terms of performance.
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php