[fpc-pascal] Re: [Bulk] Re: Namespaces Support

Dmitry Boyarintsev skalogryz.lists at gmail.com
Mon Oct 28 18:22:02 CET 2013

So, what you're looking for is to change a "unit search priority" for a
specific units compiled:

// use a unit.
// set the units search priority path

In that case, if MClasses is used by "msegui.pas", "Mclasses" from
/path/mse will be used, instead of "Mclasses" found elsewhere?
If any other unit uses MClasses, it will be using MClasses that's found
Hmm, and compiler will have to create two separate "mclasses" object files
(and update the reference appropriate) .

And that should solve (unit or namespace) name collisions throughout
3d-party components.


On Mon, Oct 28, 2013 at 9:43 AM, Marcos Douglas <md at delfire.net> wrote:

> On Mon, Oct 28, 2013 at 10:17 AM, leledumbo <leledumbo_cool at yahoo.co.id>
> wrote:
> >> My more fresh example is:
> > I have, for years, many units that have the prefix 'M'. So I have
> > MClasses, MCore, MTasks, MSystem, etc.
> > Now MSEgui (by Martin Schreiber) introduced a mclasses unit -- your
> > own implementation of classes unit -- and I can not use both units in
> > the same project. :(
> >
> > Namespace does NOT solve the problem. If MSE units uses M.<unit> for
> their
> > units and you have yours the same as well, you'll end up renaming either
> > anyway.
> Please, see my mail before.
> The major problem is using third-party codes. You do not have access
> to change these codes -- well, you could but you would miss the
> updates from original one.
> I do not like Java, for example, but this language allows the
> programmer make your own paths and use them in 'uses' (import) clause.
> The problem of Pascal language isn't Namespace support because we
> already have it (unit). The problem, IMHO, is do not have the
> flexibility to change the 'path' and/or the 'name' of 'Namespaces'.
> Marcos Douglas
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131028/e8dbf0d8/attachment.html>

More information about the fpc-pascal mailing list