[fpc-pascal] Re: How to avoid namespace name clashes after USES ?

Jorge Aldo G. de F. Junior jagfj80 at gmail.com
Tue Aug 21 15:13:58 CEST 2012


I already know that you can fully qualify, i believe you misread my post.

Its not that common to have name colisions if you use prefixes like i said.

I cant see how the added complexity of full name space support would
help pascal in that regard.

2012/8/21 Sven Barth <pascaldragon at googlemail.com>:
> Am 21.08.2012 14:10, schrieb Jorge Aldo G. de F. Junior:
>
>> "With no error messages, or even with no changes to the program since 1
>> and a half year in the repository, the scientific calculations are now
>> all blown up, and program outputs only errors at runtime. The maintainer
>> now curses and chases me for having the nerve to leave a program
>> known as working in such a horrible mess in the repository."
>>
>> Never tested, but doesnt the compiler warn of the colision ? if not, it
>> should.
>>
>> Usually i prefix my symbols with some meaningfull prefixes to avoid
>> collision. I never have two symbols with the same name and i hardly
>> used unit prefixes in the past.
>>
>> But a collision warning from the compiler would be helpfull.
>
>
> Units provide a namespace, so UnitA.Foo is not the same as UnitB.Foo. Thus
> it is perfectly allowed and valid and sometimes also common to have a
> collision here. [also the compiler stops looking for further symbols if it
> has found the first one => one of the reasons for the high compilation
> speed]
>
> Regards,
> Sven
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list