On the dangers of automated refactoring

Mark Wieder ahsoftware at sonic.net
Tue Apr 13 14:47:24 EDT 2021

On 4/13/21 9:48 AM, Richard Gaskin via use-livecode wrote:
> Andre Garzia wrote:
>  > What I didn’t realise was that there was variable shadowing happening
>  > in which handler arguments were named with the same name as script-
>  > local variables, my smart replacing removed those arguments because
>  > there was no need to redeclare the script-local vars. I didn’t realise
>  > at that time, that those variables were real arguments being passed to
>  > the handlers, they just happened to have the same name as script-local
>  > vars in the same script and were in fact shadowing them.
> Is this a case where "Strict Compilation Mode" or Hungarian-lite* 
> notation may have been useful?
> * http://www.fourthworld.com/embassy/articles/scriptstyle.html

But knowing Andre I'll bet he didn't write the original code, just had 
the good fortune to inherit it. <g>

  Mark Wieder
  ahsoftware at gmail.com

More information about the use-livecode mailing list