NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Module::Pluggable? (Score:1)
import-on-demand is not a best practice (Score:1)
is generally considered bad practice, good only at quick-and-dirty code. Tools like Eclipse help expand these evil statements into qualified imports after compiling and resolving the class names in the current source file.
Some of the problems are mentioned at http://javadude.com/tools/importifier/ [javadude.com]
Re: (Score:2)
You know, I think you make a compelling argument. I'll have to consider this and I might just drop the idea.
Re: (Score:1)
You really should only call what you need and if you do somthing like Our::Code::*; You may be surprised by what you are importing (whether you did it intentionally or not).
Shortcutting (Score:1)
For me, the beauty of 'aliased' lies mostly in its shortcutting of names. If I'd want to make an API to declare multiple of these in one, I would probably do...
With this, it is IMO short enough, explicit enough, and contains no surprises.
Ordinary morality is for ordinary people. -- Aleister Crowley
Poor Maintenance Programmers (Score:1)
Java's an unreadable language because novices can't look at that program and instantly know where exactly every import came from. (Hey, this argument is fun to make!)