[fpc-pascal] Re: Ideas for namespace implementation
graemeg.lists at gmail.com
Mon Jul 26 11:56:36 CEST 2010
Op 2010-07-26 11:34, Michael Van Canneyt het geskryf:
> Well, I fail to see what is more logical in my.constants than in myconstants.
> The unit is still called my.constants, not constants. So you'll end up
> typing my.constants everywhere anyway. The gain of this over myconstants is
> highly debatable.
> Since (as jonas points out) it introduces an ambiguity and violates the rule
> that a unit name must be a pascal identifier, the pros must be weighed against
> the contras. The contras are known.
You are confusing the point. (excuse the pun) :)
My preferred namespaces implementation is *not* the dotted unit names like
Delphi currently have. My preferred method (see my other message thread)
would be a 'namespace' keyword and a new -namepace= compiler parameter.
Unit names will stay the same as the currently are - a legal identifier
without the use of extra dots in the unit name.
In my opinion, this is a much better idea than what Delphi implemented.
- Graeme -
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
More information about the fpc-pascal