Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2050

Re: Why so many imports instead of java.io.* ?

From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.help
Subject Re: Why so many imports instead of java.io.* ?
Date 2012-08-21 11:51 -0700
Organization http://groups.google.com
Message-ID <42af290e-da6b-49c4-bd14-dffd9b303ced@googlegroups.com> (permalink)
References (8 earlier) <07at28h5ocrl14vlgd06cesi4hne7gqkj2@4ax.com> <50326127$0$292$14726298@news.sunsite.dk> <reednaUKMPD39a_NnZ2dnUVZ_tadnZ2d@earthlink.com> <50337928$0$290$14726298@news.sunsite.dk> <EaSdnUSBUMttJq7NnZ2dnUVZ_oSdnZ2d@earthlink.com>

Show all headers | View raw


Patricia Shanahan wrote:
> Timothy Madden wrote:
>> Patricia Shanahan wrote:
>>> Timothy Madden wrote:
> >> ...
> >>> I don't appreciate coding conventions either. For once, they are
> >>> mischievously named "conventions", "style" or "guidelines", but if you
> >>> don't follow them, you can't work in project ... which makes them hard
> >>> rules, not conventions.
> 
> >> I do think a project should have rules, not conventions. I don't care
> >> much what they are, as long as visible indent reflects logical nesting.
> 
> > Some programmers already have a style that they feel comfortable working
> > with, that they are used with. For them the "project should have rules,
> > though I don't care what they are" attitude is not good enough. A
> > different style is too annoying and distracts you from your work, and
> > chances to get a project that enforces exactly your style are slim.

That's why good programmers always adapt to the house style.

Just like good writers follow the house style of the publication wherein 
they publish their work.

> > This is why these "conventions" should be choosen carefully and should
\> > be limited to a minimum of rules like:
> 
>> 	"use either spaces or a tab size of 8, an indent of +4, and use
>>           braces on their own line",
>> and otherwise let the programmers be creative and flexible, instead of
>> showing them a long document full of rules.

In the case of Java, that ship sailed thirteen years ago.

There are standards. Live with them.

> In your ideal world, what would happen when Tom needs to change a class
> that Harry wrote? They disagree about just about everything except
> indentation.
> 
> Would the class end up with most identifiers following Harry's
> preferences, but a couple following Tom's preferences? What if Tom finds
> Harry's style annoying and distracting? Will Joe, who later needs to
> study the class, have to cope with two conventions in the same file?

"A foolish consistency is the hobgoblin of little minds". But not if it isn't 
foolish.

I worked one place that told us, "We have coding standards. You will hate 
them. That's all right, as long as you follow them."

-- 
Lew

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-14 15:23 +0300
  Re: Why so many imports instead of java.io.* ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-14 08:45 -0400
    Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-14 06:16 -0700
      Re: Why so many imports instead of java.io.* ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-14 10:52 -0400
  Re: Why so many imports instead of java.io.* ? Jeff Higgins <jeff@invalid.invalid> - 2012-08-14 09:05 -0400
  Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-14 16:31 -0700
    Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-16 16:39 +0300
      Re: Why so many imports instead of java.io.* ? Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-08-16 11:51 -0400
        Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-17 15:08 +0300
          Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-17 11:26 -0700
            Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-17 12:53 -0700
              Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-17 12:58 -0700
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-17 13:27 -0700
                Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-20 19:09 +0300
                Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-20 09:40 -0700
                Re: Why so many imports instead of java.io.* ? Timothy Madden <terminatorul@gmail.com> - 2012-08-21 15:03 +0300
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-21 09:05 -0700
                Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-21 09:48 -0700
                Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-21 11:51 -0700
                Re: Why so many imports instead of java.io.* ? Patricia Shanahan <pats@acm.org> - 2012-08-17 14:39 -0700
                Re: Why so many imports instead of java.io.* ? Lew <lewbloch@gmail.com> - 2012-08-17 15:39 -0700
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-17 15:57 -0700
                Re: Why so many imports instead of java.io.* ? Lew <noone@lewscanon.com> - 2012-08-18 11:03 -0700
                Re: Why so many imports instead of java.io.* ? Gene Wirchenko <genew@ocis.net> - 2012-08-19 18:07 -0700
  Re: Why so many imports instead of java.io.* ? Roedy Green <see_website@mindprod.com.invalid> - 2012-08-14 17:46 -0700

csiph-web