http://www.perlmonks.org?node_id=314000


in reply to Being helpful to a fault?

I have to agree with you. A bad idea is still a bad idea even if you carry it out smartly.

I tell you what I do:

In Java, regardless whether I need all of the classes in a particular package, I can easily import all of them by doing something like:

import java.util.*;

But I never did that, instead I always specify each class I need:

import java.util.Vector; import java.util.Hashtable;

Why? Because I know what I am doing, and want to hold it tightly.

Replies are listed 'Best First'.
Re: Re: Being helpful to a fault?
by halley (Prior) on Dec 11, 2003 at 21:49 UTC
    While everyone's talking about "9 times out of 10," my first guess at reading that other node was that the poster was familiar with the Java idiom, and just wanted to do the same thing in Perl. Of course, a six-line bit of cargo-cult chicanery isn't a useful idiom, but the question was interesting anyway. The "bigger question" here is that idioms are just that: they make sense in one language, but don't translate as well. "You're pulling my leg" means nothing without cultural context. import java.util.*; is similarly bizarre to people wearing Perl-colored glasses.

    --
    [ e d @ h a l l e y . c c ]