Hi!

> Options are: * "5-to-6" tool, similar to python's "2-to-3" converter,
> which will fix code.

Do you know any practical way of how such tool could work?

> * introduce some kind of per-file declare() option, which would
> enable pass-by-reference semantics of arrays/strings/etc. in 5.5
> which would let people write the same code for 5.5 and 6.x

I don't think it's a viable option. The goal is to run existing code, if
you'd need to change each file that defeats the purpose of it.

> Well, actually, there's one more option: we can introduce
> "Autocloned" interface (empty, without methods) and force "cloning"
> of objects, which implement this interface, during parameter-fetching
> phase. This would allow us to have 2 sets of classes: One set which

It's not only parameter fetching. It's everywhere - assignment, access,
etc. Example:

$b = $a;
$b[0] = 1;

$a should not change in this situation, for arrays. For objects, $a and
$b are the same. Different semantics. Introducing such semantics for
classes would be a major complication in the engine, even if it's doable
(which I doubt) I don't think it is a goo idea.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to