Re: Re[2]: Re[2]: 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: > B> Another example of breaking BC without adding anything new... > It is not "breaking". It is adding new feature without changing > existing behaviour (apropos, undocumented behaviour). It is not a new feature, assigning by ref facilities are already provided by Smarty. > (What is BC? "Before Christ"? Or, maybe, "Bachelor of Commerce"?) Hmmm. have you heard of the term Backwards Compatible? FWIW, "Bachelor of Commerce" is usually denoted B.Com. > Seems I know why are you so afraid to modify existing core. The > reason is good and noble - you are afraid of new possible bugs. > But everything has its measure. You are right about that -- conversely, I'm getting the idea that you are too ready to modify the core without considering how others might be using it :) This breaks BC because it changes the way assign works. In particular, what if someone is currently doing something like this: $a = "b"; $b =& $a; $smarty->assign('b', $b); So now in template {$b} == "b". However, if from a plugin: global $a; $a = "c"; With your patch, the in-template result is that now {$b} == "c" and this is *not* the currently expected result in Smarty. You can say what you want about the value of that usage pattern -- the point is, you can't predict if people are using it or not (and there are other ways to invoke that scenario). Sorry if I sounded too abrupt before -- I realize you are trying to add value and I should have taken the time to provide a more thorough comment to your proposal instead of dashing out a one-liner as I did. Best Regards, 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