> However, that also means there's an enormous potential for race
> conditions.  Technically no more than closures now, but the use cases
> seem like they'd make it more prevalent.  If you "use" by reference, or
> use a mutable object, or a service that depends on IO, etc. then the
> resulting value of the lazy variable is not technically
> non-deterministic, but will certainly feel like it to the developer.

I think that lazy statements should not be used when you can have
possibilities like that. It should not be a substitute to methods.

So, for instance, if I have a mutable dependency, is better I create
a method to do that, that could work better with that.

I can think about how we can handle this, but I need a real case
where this problem can exists. Can you help with this?

Thanks!

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

Reply via email to