[fpc-pascal] dot within unit file name
Michael Van Canneyt
michael at freepascal.org
Fri Jan 18 13:26:21 CET 2008
On Fri, 18 Jan 2008, Matt Emson wrote:
> 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;
What is the difference ?
The second one saves on typing, which is a plus in my book ?
> File names should have nothing to do with Namespaces too.
>
> I'd also love:
>
> unit Blah;
> Namespace MyAPI.Blah;
And how will you know which namespace is in what unit (or file) ?
You then need a second structure mapping namespaces on filenames, making it
slower, bulkier and error prone. The cure is worse than the disease, IMHO.
Michael.
More information about the fpc-pascal
mailing list