---- En vie, 08 may 2020 15:31:52 +0200 Levi Morrison 
<levi.morri...@datadoghq.com> escribió ----
 > I think changing reference is a bad idea, even if it's behind some
 > sort of declare or ini setting or what-have-you.
 > 
 > I do support `inout`, which has similar high-level outcomes: the
 > current value is fed in, and when the function returns it has a new
 > value. I think we should use `&` at the call site, and we should also
 > permit it optionally for by-ref parameters as it provides a migration
 > path: first add `&` to all the call sites, then switch it to `inout`.
 
Hi, Levi,

Thanks for your opinion.

Why don't reverse mode ?. 

'inout' is created with the three characteristics:
 
- Check type of out is equal to type of param
- Avoid modifying caller variable value when the function throws an exception. 
( Like  inout of Hacker language )
- Allow explicit call-site pass-by-reference annotation. 

Then, current references are deprecated and after than, in other version, they 
are removed.

In this way, projects can be adapted gradually

Regards
--
Manuel Canga

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

Reply via email to