Like Michael,

I see units as namespaces already existing: we use the unit names to prefix ambiguous function or variable names for example.

In addition, units are similar (but simpler) to Ada packages, which are much more robust than namespaces. If we want to go the full way, let's implement Ada packages instead of namespaces, by extending the unit concept. (see here for an example : http://www.adaic.org/whyada/intro4.html)

Let's not add yet another concept to manage the naming. Units and types are enough. One issue is for example, what would happen to the interface and implementation of units, if an additional namespace is introduced? How would the conflicts be managed? Would there be private units or public units?

I vote for robust Ada packages, if we need them. Such packages can form a hierarchy, can be visible or not from other packages. In addition, we would have the ability to separately compile the interface and the implementation sections of the unit, which is not possible currently with FPC.

Thierry

On 26/07/2010 15:16, Graeme Geldenhuys wrote:
Hi,

I created a wiki page for this to consolidate ideas.

   http://wiki.freepascal.org/Namespaces


Regards,
   - Graeme -

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to