On Thu, Sep 27, 2012 at 12:08 PM, <michael.vancann...@wisa.be> wrote: > > > On Thu, 27 Sep 2012, Marcos Douglas wrote: > >>> >>> Yes, it's always possible. In practice, I haven't seen this happen a >>> single >>> time in the 10+ years that the compiler has had this feature. That >>> doesn't >>> mean that it's impossible, but it's another factor in the "good to have" >>> versus "causes more harm than good" equation. >> >> >> Well, happened on the own compiler. ;-) >> IMHO, these collisions happen a lot and because of this many >> programmers use prefixes in local variables, see: >> lNet, fpGUI, tiOPF2, Indy, and even Delphi (DateUtils unit eg.). > > > Exactly. > > The compiler helps you by forcing you to use a prefix in objfpc mode in case > you forgot.
The collisions exist because the compiler give us an error. If the compiler respect the scope, the collisions would not exist. However we can use "poor names" -- very difficult to happen a collision -- to represent a variable like A, J, D... but I do not think this is a good practice and you? Marcos Douglas Marcos Douglas _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel