[fpc-pascal] Namespaces Support

Michael Van Canneyt michael at freepascal.org
Fri Oct 25 10:51:00 CEST 2013

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.

We make a feature available, and then you are going to say to users of this feature
"if you use it as intended, it is your own fault, you deserve what you get"

What kind of attitude is that ?

We can discuss the desirability of the namespaces feature. 
I am of the opinion that we didn't need them at all. 
But OK, Delphi compatibility and so on. We know the reasons.

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.


More information about the fpc-pascal mailing list