[Lazarus] Namespace

Andrew Brunner andrew.t.brunner at gmail.com
Sun Jan 9 17:57:39 CET 2011


I just started leveraging this fact in my project.  The complaint I
bring is that I don't want to use a class object.  I want a dedicated
NameSpace as a reserved word.

ie.)

NS_APP_FIELDS=class
const
  VALUE1 = 'VAL1';
  VALUE2 = 'Val2';
  VALUE3 = 3;
end;

NS_APP_FIELDS=NameSpace
const
  VALUE1 = 'VAL1';
  VALUE2 = 'Val2';
  VALUE3 = 3;
end;

I recognize it doesn't change much, but it would sure look more
industry standardized if this would work.  Even If in the interim,
NameSpace:=Class ;-) somewhere... But to do it right there should be
differences between classes and NameSpaces inside units.  Whats even
more impressive is the fact that this could be coupled with
abstraction

But back on direct topic, I often use unit names to specify which
method I want explicitly accessed/used.  In my project, sockets,
byeArrays mean different things depending on where you are in specific
a context.  Having the option to clarify where the item is typed was
offered way back in Delphi days.




More information about the Lazarus mailing list