[Lazarus] Packages and units with the same name

Marcos Douglas B. Santos md at delfire.net
Sat Oct 14 00:03:19 CEST 2017

On Fri, Oct 13, 2017 at 6:40 PM, Sven Barth via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> On 13.10.2017 21:32, Marcos Douglas B. Santos via Lazarus wrote:
>> [...]
>> IMHO, would be better if packages may have just some "exported units".
>> What do you think?
> It doesn't matter. Any symbols in a unit are mangled only locally to the
> unit and there *can not* be two or more symbols with the same name in
> one program. What you ask for is simply not possible.

Is it not possible *today* or never?
I don't know how the compiler works, but try to understand me:
I would like to modularize a big program in small packages — because
it's better than to use dll/so.
Each one these packages will work in a bounded context. Each one may
have a "Facade" to the main program, exposing its "interface" (classes
and interfaces, most).
So, the main program shouldn't know nothing about "private units" that
belongs only for the package.
That is encapsulation too.

Best regards,
Marcos Douglas

More information about the Lazarus mailing list