+1  A: 

The main advantage of USE, ONLY for me is that it avoids polluting my global namespace with stuff I don't need.

ire_and_curses
+3  A: 

It's a matter of balance.

If you use only a few stuff from the module, it makes sense if you add ONLY, to clearly specify what you are using.

If you use a lot of stuff from the module, specifying ONLY will be followed by a lot of stuff, so it makes less sense. You are basically cherry-picking what you use, but the true fact is that you are dependent on that module as a whole.

However, in the end the best philosophy is this one: if you are concerned about namespace pollution, and you have a module so large that you feel compelled to add ONLY, it means that your module is too big. Split it.

Update: Fortran? just recode it in python ;)

Stefano Borini
This is a useful heuristic for "how large should my module be?".
Tim Whitcomb
+4  A: 

I used to just do use modulename - then, as my application grew, I found it more and more difficult to find the source to functions (without turning to grep) - some of the other code floating around the office still uses a one-subroutine-per-file, which has its own set of problems, but it makes it much easier to use a text editor to move through the code and quickly track down what you need.

After experiencing this, I've become a convert to using use...only whenever possible. I've also started picking up Python, and view it the same way as from modulename import *. There's a lot of great things that modules give you, but I prefer to keep my global namespace tightly controlled.

Tim Whitcomb
I like your analogy to importing Python Modules--good thinking!
Pete