In python a statement like this:
from module import function354
makes sense, because Python is an interpreter language and I don't want python to load all 353 other functions.
Fortran has a similar construct:
use module, only : function354
Why would I use this? The compiler creates a *.mod file anyway, compiling all function. Is there any performance advantage (in compile or run time) if I specify an only
-statement?
I can see that it might be helpful to avoid naming conflict, but other than that I don't really see the point.
Two main reasons
use, only
is a useful addition to aid thisuse, only
is a nice feature to aid code readabilityYou don't just want fast code - as important is maintainability, and more important is correctness!