On 29 April 2017 17:25:45 BST, Sara Golemon <poll...@php.net> wrote:
>Your example of GMP can't be simply dismissed as "a special edge
>case", it's precisely true that internals does not always follow the
>same rules as userspace and often it breaks those rules for very good
>reason.

I think the adage applies here that you should first acknowledge rules before 
you break them. GMP *is* a special case; it is one of very few instances, if 
not the only instance, of overloading arithmetic operators, and IIRC that was 
the subject of a whole RFC. It was agreed that the use case justifies the 
special behaviour.

In this case, we should acknowledge that userland cannot (delta dirty backtrace 
hack) change behaviour based on strict types inside the body of the function, 
and in most cases neither sold internal functions. We can then decide if this 
use case merits breaking that rule or not.

Regards,

-- 
Rowan Collins
[IMSoP]

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

Reply via email to