[fpc-pascal] Ideas for namespace implementation

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Jul 26 22:48:14 CEST 2010


On 26 July 2010 19:26, Thierry Coq <tcoq at free.fr> wrote:
>
> I see units as namespaces already existing: we use the unit names to prefix
> ambiguous function or variable names for example.

Unit Names give very limited namespace support - which only applies to
types or procedures/functions or global variables (anything in the
interface section of a unit). They to not resolve unit name conflicts.
eg: RTL contains a constants.pas unit, but I want to create a
constants.pas unit in my project too. With the state of unit name
rules at the moment, this is not allowed. The units included in the
compiler always takes preference, and everybody else has to keep
renaming units, and do search & replace until no conflicts occur.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list