On 14/01/2015 00:16, Andrea Faulds wrote:
Here: https://wiki.php.net/rfc/scalar_type_hints

This is a new thread because I’ve made a significant revision to the RFC, so 
it’d be sensible to separate discussion of the updated RFC from the v0.1 RFC.

Reading the thread at this point shows so much confusion, it seems half the people reading the spec misunderstood that the declare() line affects function calls only and not the API/implementation level.

As much I think it was a smart idea and workaround, it is perhaps too clever for its own good if nobody gets it.

Anyway, as v0.2 appears to be v0.1 + declare(), why not keep those two options separated in the vote?

a) should be add weak typing
b) should we also add declare() for to get strict typing at call-site.

If *a* passes it would be a great stepping stone towards adding *b* later perhaps, or tweaking internal coercion rules to improve the behavior of the weak types, having scalars in return hints (since return hints seem likely to pass), etc.

If *b* passes as well great we have a complete picture and every team can have declare() Y/N in their own coding guidelines based on preference.

Cheers

--
Jordi Boggiano
@seldaek - http://nelm.io/jordi

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

Reply via email to