alternative aliases [Re: [fpc-devel] Re: [fpc-pascal] Re: Ideas for namespace implementation]

Alexander Klenin klenin at
Wed Jul 28 04:19:13 CEST 2010

On Wed, Jul 28, 2010 at 00:02, Martin <fpc at> wrote:
> Ah ok, well relative pathes can be done, but question is => do they need the
> namespace (leaving out the qualified unitname in source)
> if you just look at the uses clause => you do not need a namespace then =>
> you need "in" to work in units (and not only in program)
>  unit foo;
>  uses bar in './ralative/path' alias SomeBar;
> or
>   uses SomeBar = (bar in './ralative/path');
> hm, here the = solution looks ugly / and in is correctly used.

Sure, this would be the best solution from my POV,
(only I would write it as
uses SomeBar = Bar in 'relative/path';
i.e. no unnecessary parenthesis and no starting './', since allowing
absolute path inside unit code is clearly insane anyway,
so they may be all assumed relative).
However, it was stated rather forcefully at the beginning of
the thread that FPC developers do not like this solution
(I am not sure why, and maybe I misunderstood).
Hence the need for your '-Fu' hack.

> if -Fu allows relative pathes, then a namespace can be defined there based
> on the path in -Fu

Of course, I was just saying that -Fu _must_ allow relative path
for aliasing to be useful for me.

Alexander S. Klenin

More information about the fpc-devel mailing list