[fpc-pascal] Namespaces Support

Tomas Hajny XHajT03 at hajny.biz
Fri Oct 25 12:26:37 CEST 2013

On Fri, October 25, 2013 10:51, Michael Van Canneyt wrote:
> On Fri, 25 Oct 2013, Marco van de Voort wrote:
>> In our previous episode, Michael Van Canneyt said:
>>>> Delphi uses winapi, not windows.
>>>> And I see no need. There is so much code in use that assumes the
>>>> standard
>>>> names, and I don't see a need to force existing codebase users to
>>>> rename
>>>> everything just to free up a few unit names for packages that are
>>>> essentially free to chose their own.
>>> There is a need. Without it, you will severely cripple the use of
>>> default namespaces.
>>> If someone
>>> * defines a namespace 'mycompany',
>>> * uses that namespace as the default namespace
>>> * has a 'classes' unit (or anything else that name-clashes with our
>>> units) in that namespace
>>>    he/she will never be able to use our classes unit again.
>> Yes. And he deserves it IMHO.
> Strange reaction.
> As I said: the above scenario is the very reason why namespaces were
> invented to begin with.
> But if we do decide to introduce them, then we must be consequent all the
> way through
> and support their use as intended. That includes IMHO releasing a RTL/FCL
> whatnot with all the proper namespaces.

What would be "the proper namespaces" for FPC - the namespaces chosen by
Embarcadero (which may change from one Delphi version to another - not
sure whether it happens in reality, of course, but the point is that it
would happen completely outside our control) without any consideration of
our own structure (e.g. rtl versus packages)? Or a different structure for
FPC (e.g. fpc.rtl...., etc.)? Are there any implications for our own units
(the argument about possible conflicts applies to them too)?


More information about the fpc-pascal mailing list