Re: Re[6]: mixing of asign() and assign_by_ref() overwrites external vars
boots <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Dmitry Koteroff <[email protected]> wrote: D> So, now API is not touched, deprecated & call works as without &, D> but assign() after assign_by_ref() does not modify source D> variable. B> If it doesn't change the source variable, what was the point of B> using a assign_by_ref() in the first place? D> Of course, to pass objects to template without copying. Of course, that is not the only thing that creating a reference does. You and Sebastian aren't being realistic about this point, IMHO. D> $b = "xxx"; D> $smarty->assign_by_ref("b", $b); D> $smarty->assign("b", "!"); D> echo $b; D> What THEORETICALLY should print last echo statement? "!" or D> "xxx"? Whad documentation says about that (or should say)? Please D> answer. *READ* my previous post for my discussion on this. We already discussed this issue. Why do you create a new example to demonstrate an example that was already given and discussed? You aren't answering my question, you are trying to wiggle out of it be restating my example. D> It is now question of principle, of course, not practical. B> Yes, if it was a practical issue, I'm sure I (and others) would B> lend support behind it or something like it. If it is a matter of B> principle, what do you suppose the principle at stake is? D> See example above. That is the question. That's not a principle, though. You yourself stated it was a matter of principle but now you point to a technical issue that we already dealt with and agreed was not even the point. Dmitry, I'm curious -- why are you pushing this so heavily? Have you noticed I am the only one replying? NO ONE CARES. Do you want me to tell you that your patch was really clever and simple and that you came up with it really quick? That is all true! It is all of those things. Yet, I maintain that it is redundant and unwarranted. Unless you come up with a new argument, I don't expect I'll change my mind on that. Here's my final vote on the issue (since it is all I have anyhow): -1 B> On an ancillary note, it will be interesting to see how everything B> pans out in the PHP5 timeframe where all of these PHP4 copy/ref B> semantics take on new meanings, but that is another story... D> PHP5 does not introduce new meaning for &=. It only introduses D> new meaning of object dereferencing. My point is that: $a = new foo; $b = $a; // in php5 this is equivalent to PHP4's $b =& $a; afaik But I'm sorry I mentioned it :) Cheers! xo boots __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php