> On 26 July 2010 19:26, Thierry Coq <t...@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).

And that sure is enough - unless you want to extend to Ada's package concept 
(which in fact is more than just "namespace") and even there you are not immune 
to name conflicts. I suppose you know that as you were the one who suggested 
it. ;)

But then, IME (most) name conflicts are a sure sign of inproper names. Take the 
example of "constants.pas": What sort of constants shall I expect there? Screen 
sizes, color codes, electron mass or the gravitational constant?

Namespaces are a clutch added to C++ because being stuck with C-compilers they 
simply had no proper solution. Remember, in C _every_ visible identifier is in 
the same scope. There are no "units".


Vinzent.
-- 
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to