Vinzent Hoefler wrote:
On Friday 18 January 2008 12:35, Bee wrote:
Namespaces are too flat and simply not powerful enough to justify the implementation and maintenance effort.

And units are better because...?

I would take Namespaces over the crippled '80's unit notation any day. Units come from an age when filenames were limited to 8.3 format. Yes, we now have longer unit names, but Namespaces give context if nothing else.

Scoping is what you make of it. Java has Packages, C++ has Namespaces, C# has DotNet style Namespaces (not entirely the same thing.) I'd far rather have:

uses Windows.Win32.Standard, Windows.Win32.Messages;

than

uses Windows, Messages;

File names should have nothing to do with Namespaces too.

I'd also love:

unit Blah;
Namespace MyAPI.Blah;

interface
type
 TTest = partial class
     //non GUI code
  end;
implementation
end.

and then be allowed

unit Blah.GUI;
Namespace MyAPI.Blah;

interface
type
 TTest = partial class
     public
        //GUI code
  end;
implementation
end.


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

Reply via email to