Proposal: Package aliases
Ary Borenszweig
ary at esperanto.org.ar
Thu May 15 14:58:29 PDT 2008
Leandro Lucarella escribió:
> Ary Borenszweig, el 15 de mayo a las 11:07 me escribiste:
>> Bill Baxter wrote:
>>> I think it would be convenient if packages could be aliased.
>> I'm really amazed that this is a problem. For example in Java, I almost never need to
>> worry about the name of a package or if the package name is long, or how many characters
>> I'll have to write in the import. Why? Simply because I use an IDE that does that for me.
>
> IDEs help to to write code, not read it. Code is readed much more times
> than it's written, so having a clean reable code is a good thing =)
Exactly. If you read "Float.toString(5);" you first say "Ok, toString
must be some static method of some class or struct Float". Then you
start searching and realize it's an alias, or an aliased imported
symbol. So to actually understand the code you need to make some jumps
through the source code... indirections. I prefer to write the fqn if
there are ambiguities.
> And BTW, some people don't like IDEs. Things should be easy to do without
> using an IDE. The problem is the other way arround: in Java you *need* an
> IDE because all is so redundant.
I started writing in Java without an IDE. Compile, fix errors, etc.
Remember what the name of the method was, and which arguments it
accepts. In which package a class is located. Renaming was terribly
slow. I can still program in Java without an IDE. But with an IDE my
productiviy is really boosted.
In D you also need to make most of these steps, so I do believe that D
is less redundant, but an IDE always boosts your productivity.
More information about the Digitalmars-d
mailing list