[fpc-devel] Local variable names and colision with attributes/properties names
michael.vancanneyt at wisa.be
michael.vancanneyt at wisa.be
Thu Sep 27 17:08:36 CEST 2012
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.
Michael.
More information about the fpc-devel
mailing list