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

Jorge Aldo G. de F. Junior jagfj80 at gmail.com
Wed Aug 22 04:34:00 CEST 2012

Edit myunit.pas

Unit myunit.pas; <- backspace backspace backspace

Unit mynewunit.pas;

Alt-S Alt-X

Ren myunit.pas mynewunit.pas

No collisions now !

2012/8/21 Marcos Douglas <md at delfire.net>:
> On Tue, Aug 21, 2012 at 11:13 PM, Jorge Aldo G. de F. Junior
> <jagfj80 at gmail.com> wrote:
>> "Yes, we know too... but how prevent this using third-party libs?
>> For example, what do you think if I have a project that have a file
>> called lnet.pas? Can I use this identifier? I think so... WAIT, I
>> can't because the lnet project already uses, right? But I didn't know
>> before...ohh my... and now, I can't use this project because I will
>> got a compiler error because "cant have two units with the same name".
>> Do you think this is right?
>> Because of this conflict that I proposed the syntax:"
>> How many times this actually did happen ?
> Depends how many third-party libs do you use in a single project.
> Ah, I'm not talking about just open and famous libs, but any one!
> For example: In a company we can have many departments; each
> department can have your own lib; each department can choose the names
> of your own identifiers and here is the problem.
> I had many problems using Object Pascal (Delphi) a long time ago.
>> I never seen that before...
> Do you use many third-party libs?  ;-)
> Marcos Douglas
> _______________________________________________
> 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