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?
Are there any practical benefits in using long unit file names like MyLib.MyUtils.pas or
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Namespaces, like all identifiers, are meant to organize.
So using them, only benefits if your project gets organized in a better way.
This highly subjective matter (there have been ‘wars’ on even the most simple naming conventions!), so impossible to really answer.
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