[fpc-devel] is that intended? private type section in classes versus visibility

Marco van de Voort marcov at stack.nl
Mon Jul 26 18:34:50 CEST 2010


In our previous episode, Graeme Geldenhuys said:
> On 25 July 2010 20:25, Martin wrote:
> > I simple have said and do say, that it does not solve the original issue of
> > this discussion.
> 
> Speaking of the hijacked thread only, with correct namespace
> implementation, it can indeed solve the problem of conflicting unit
> names (of existing code out there) without the need to rename units.
> See my other message thread, option 2. It will also allow me to use
> the more ideally named unit names like constants.pas and utils.pas in
> my projects - instead I have to keep coming up with new prefixes. I
> already have gg_utils.pas, mm_utils.pas, fpg_utils.pas, m2c_utils.pas
> for some of my projects. It would be awesome if I can simply use
> utils.pas and define a namespace via a compiler parameter.

No it won't. There only will be graeme.geldenhuys.fpgui.constants
and when you use that, you will have to USES that too. It is like that in
Java too, except you can blanket import a namespace with like

import graeme.geldenhuys.fpgui.*

But that is tightly coupled with the order of files on the filesystem, so a
quite draconical solution.




More information about the fpc-devel mailing list