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

Marcos Douglas md at delfire.net
Sun Nov 3 16:38:08 CET 2013

On Sun, Nov 3, 2013 at 1:25 PM, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, Benito van der Zander said:
>> > Then the John Douglas and Douglas McKey are running into the same issue.
>> > Both guys (while living on different parts of the world) created the
>> > same "douglas" namespace!
>> That's why most languages use domains as namespace
>> Then you would have
>> net.delfire.douglas.*
>> org.msegui.*
> If you start to use short class names (by importing with *), the ambiguity is back
> again.


In Java, eg, if you have two imports with "*" and the two "packages"
have the same class name, the compiler do not allow you declare only
class name for a variable... "duplicity of names". Because this we see
many sources (Java) that for a simple variable the programmer uses the
full name (package and class name).

If we have "dynamic namespaces" in Pascal, we can use a big name for
units (like a big path for a Java's package) but to use simple names
on the code.

Best regards,
Marcos Douglas

More information about the fpc-pascal mailing list