[fpc-devel] Purpose of "uses ... in"?

Marcos Douglas md at delfire.net
Wed Jul 14 19:13:21 CEST 2010

On Wed, Jul 14, 2010 at 2:05 PM, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
> On Wed, 14 Jul 2010 13:54:10 -0300
> Marcos Douglas <md at delfire.net> wrote:
>> > I would tell the devels of the framework.
>> > And if they want to keep it, then I can not use both Dialogs units. I
>> > had not yet the case where I needed both and can not rename both.
>> Then, another example:
>> You want to work with ZIP and RAR format files. So, imagine you found,
>> on the net, 2 libs, one for each type format. The problem is each lib
>> uses the same name to main unit e.g. zip.pas.
>> Both libs are very used by million of people on the world and they,
>> the developers do not want to change the name of yours unit.
> Do you have the links to the two projects?

No, that was an example...

>> And now, you understood the little problem?
> Of course I understand the problem, but I have not yet encountered
> it in a real project.

So, if we can to put an alias to unit names, there are no more problem.
I had this problem in real projects. Always happen with the units that
have very short names or names that are very generic. Therefore, most
of the frameworks put a prefix in the units.

BTW, I use "my" prefix for units of project (e.g. myparser,
mytextutils, mydb, etc).
If I create a lib, I choose other prefix.


More information about the fpc-devel mailing list