Question: Do you always fully qualify your units in the uses clause(s)?

Question: Do you always fully qualify your units in the uses clause(s)?

i.e.

vcl.Buttons, xml.XMLDoc;

instead of just

Buttons, XMLDoc;

12 thoughts on “Question: Do you always fully qualify your units in the uses clause(s)?


  1. I recently dropped XE support in my SelectiveDebugging plugin mostly for that reason. The IDE and the IDE tools I use simply don’t play well with unqualified unit names. In addition I feel some performance gain as well as a better Code Insight experience when unit names are fully qualified (in addition to explicitly add the units to the project), but that is highly subjective.


  2. Uwe Raabe, I can promise you that it is not subjective. The less of the prefixes that exists in the Project options, the less file lookups are done. I wanted to remove them all, but that screwed up the compiling of the TMS units – who don’t use fully qualified names.


  3. The number of lookups for unqualified unit names = * ( + )


    By reference directory, I mean files that have been attached to a project from any fixed path (which becomes a reference directory)- even if the file is not a compilable item – such as an .html file.


    I suddenly discovered that the IDE was trying paths that were on the network – which naturally brought Code Insight to be slow as molasses.


  4. Come to think of it – it will actually always pose a problem that we use scopeless unit names, since they will always cause a number of combinations (as indicated in the previous comment).


    Would we want to always use a MyLib.UnitName scope – or is it more important to support IDE version that don’t support scopes?


  5. There are paths in the lookup list which I can’t find in the project settings, nor in the library paths. Where to go looking next?


  6. Attila Kovacs The extra paths seem to be in the environment settings – but I am not quite certain that I see exactly how they get into the unit searches. Example of paths can be found in the QP issue.


  7. I’m considering suggesting introducing an obligatory scope for our units to get away from the extra prefix searches for our team. I’ve suggested to EMBT that unprefixed filenames are tried first.

Leave a Reply