Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1440

Namespaces in Delphi – Stack Overflow

$
0
0

Blast from the past, but still relevant: [WayBackNamespaces in Delphi – Stack Overflow:

Q

Are there any practical benefits in using long unit file names like MyLib.MyUtils.pas or it is just a kind of unit name prefix?

A

Namespaces, like all identifiers, are meant to organize.

So using them, only benefits if your project gets organized in a better way. This is highly subjective matter (there have been ‘wars’ on even the most simple naming conventions!), so impossible to really answer.

[WayBack] Here is some documentation on how namespaces work in Delphi.

Note that ‘true’ namespaces (where more than one generic DLL can contribute to the same namespace; this is how namespaces function in the .NET world) are not possible in Delphi: you could go the BPL way, but that is not the same as a ‘generic DLL’. This is not a limitation of Delphi itself, but the way that native DLLs in Windows ‘work’.

–jeroen


Viewing all articles
Browse latest Browse all 1440

Trending Articles