[fpc-pascal] Namespaces Support

Marco van de Voort marcov at stack.nl
Fri Oct 25 16:20:36 CEST 2013


In our previous episode, Michael Van Canneyt said:
> >> Strange reaction.
> >>
> >> As I said: the above scenario is the very reason why namespaces were
> >> invented to begin with.
> >
> > Not that I can see. It seems that Embarcadero used it mostly for own
> > purposes, not the users, and their support scenarios.
> 
> The discussion is about a namespace feature. 

No, it is about your interpretation for what it is meant. Fact is that
from D7 till XE2 it was not widely in use, and after mostly only for FM vs
VCL.

> Namespaces exist in other languages as well, and have certain
> characteristics.

Maybe. But they are mostly described as the cure for clashing global
identifiers, for which we already have units, and (for Java and C#) a way
to organize source.

> How Embarcadero uses them is secondary.

No, it is primary, since the Delphi compatible use comes from there.

> > I see it as a cost/benefit tradeoff. It is not the namespace added feature
> > that I worry about, but the fact that you force all existing users to find
> > out what is going on and set default namespaces in their projects.
> 
> No one forces anything. You can perfectly set the default namespace to 
> 'fpc' (or whatever) in the default config file, and all should compile as it was.

Yes. One can live with the XE2+ renaming at the cost of renaming units,
potentially fixing breakage later, and a lot of adaptation of existing
configuration, scripts etc.

But I repeat: what is the hurry?

> People that do not like this, can change it.
> Really, you are looking for problems where there are none.

Trouble is that I also think the problem that is solved is none.

I really don't see the need to rush the XE2+ part that is breaking. 

> > True. But it is now the time to force this XE2+ breaking change, while
> > you are so opposed of doing the same for the D2009 string change?
> 
> I don't oppose anything.
> 
> And let us not forget that in the FPC team, I am the one advocating 2 sets
> of units:
> 
> 1 ansistring set, without namespaces. (roughly D7 and below)
> 1 unicodestring set, with namespaces. (roughly D2009 and above)

 
> In my opinion, this constitutes exactly:
> 1. Being very consequent.

Leaving out D2009-DXE? 

> 2. Caring about backwards compatibility.

Only the one you want. I'm more interested in D2009 compatibility than I am
in D7 compatibility.



More information about the fpc-pascal mailing list