Re: True Name Spaces, when?



Thomas Miller wrote:

I think it is time for true Named Spaces in Delphi. What I mean by "true" (before I get set upon), is I would like to be able to register two components of the same name at the same time.

Delphi has inherited true namespaces from Pascal, no need to add any further bloat. Every unit represents an namespace.

What might be desireable: an option that requires the qualification of every identifier, with its unit name. Supported by a tool that extends every unqualified identifier in the source code.


This would solve the problem of having components for a specific OS.

FPC solves platform dependencies in the search path, which is initialized to include the OS and machine specific directories. The equivalent units in these directories only must have the same names, that's all.

The namespace model of .NET, inherited from C++, is crap. It requires that the compiler looks into all assemblies and modules, which are mentioned somewhere in a project, in order to collect all the bits that contribute to every single namespace. Delphi instead has every namespace in a single unit, including the interface, which in C (hopefully) will be found in some (which?) header file, or in .NET in one or more (which?) assemblies.

DoDi
.



Relevant Pages

  • Re: Strange compilation errors
    ... using a namespace just allows shortcuts in speciing names. ... several assemblies (dlls) may use the same namespace, ... you als need to add a reference to the page. ... if they end up in different assemblies, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Strange compilation errors
    ... you should not confuse namespaces with assemblies. ... using a namespace just allows shortcuts in speciing names. ... several assemblies (dlls) may use the same namespace, ... you als need to add a reference to the page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: How do I access a C# assembly from VB?
    ... It turned out the "Root namespace" setting in the VB ... project properties was set to the VB Project's name, ... > assembly shows up in the list of referenced assemblies in the Solution ...
    (microsoft.public.dotnet.general)
  • Re: Does project load DLL multiple times?
    ... my EXE webform project also references System.Windows.Forms. ... calls objects in the Forms namespace, ... You can set a reference to as many assemblies as you wish, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: System namespace.
    ... There's not a one to one relationship between namespaces and assemblies. ... namespace is not used to structure an assembly; an assembly is a unit of ... "Armin Zingler" wrote in message ... >> code requires a reference to the system namesppace. ...
    (microsoft.public.dotnet.languages.vb)