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


Groups > comp.lang.java.programmer > #8691

Re: What Does it Mean to Pass a Generic Class Itself as a Parameter?

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: What Does it Mean to Pass a Generic Class Itself as a Parameter?
Date Mon, 10 Oct 2011 14:29:41 -0700 (PDT)
Organization http://groups.google.com
Lines 38
Message-ID <20002215.1699.1318282194149.JavaMail.geo-discussion-forums@prdw1> (permalink)
References <c534ac30-345e-4467-ba44-5d719d8c22ca@6g2000prh.googlegroups.com> <j6v5ha$e7s$1@dont-email.me> <TI2dnXg8ofRugA7TnZ2dnUVZ_rydnZ2d@earthlink.com> <10851131.278.1318273920911.JavaMail.geo-discussion-forums@prng5> <XDIkq.3151$mH7.2957@newsfe10.iad>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 2620:0:1000:fd42:224:d7ff:fe69:5838
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1318282290 6406 127.0.0.1 (10 Oct 2011 21:31:30 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Mon, 10 Oct 2011 21:31:30 +0000 (UTC)
In-Reply-To <XDIkq.3151$mH7.2957@newsfe10.iad>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:fd42:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8691

Show key headers only | View raw


Daniel Pitts wrote:
> Lew wrote:
>> KevinSimonson wrote:
>>>>> Can anyone tell me what's going on here? In {Wierd} itself is the
>>>>> {Wierd} that's being extended in the angle brackets the same {Wierd}
>>>>> that's being defined in this file?
>>
>> On a tangential note, it's best practice to make identifiers, such as your class name 'Wierd', either sufficiently obviously not intended to be a natural-language word that spelling is not an issue, or to spell it the same as the natural-language word it resembles.  So, for example, to model a boundary, 'bnd' would be an acceptable variable name, but 'boundray' would not be.  The reason is that it's too difficult for maintainers to get near-miss spelling correct - the pull to spell the variable or type name the same as the natural-language word is just too strong.
>>
>> So fix the spelling of 'Wierd'.
>>
> Weird, IntelliJ IDEA will not only auto-suggest the correctly misspelled 
> variant, but the latest version, with the Spell Correct plug in, will 
> offer to rename the symbol in question to the correct spelling, taking 
> into account Camel Case word boundaries and all.
> 
> Wow, talk about a run-on sentence. Oh well, the point is that tools are 
> cool and help us flawed humans recover from many common mistakes.

Tools can help one be more diligent; they cannot make one be diligent.

IntelliJ wouldn't have that feature were it not a best practice to spell identifiers intelligibly.

The programmer still has to be aware that there is such a best practice, and to follow it.

-- 
Lew

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What Does it Mean to Pass a Generic Class Itself as a Parameter? KevinSimonson <kvnsmnsn@hotmail.com> - 2011-10-10 08:01 -0700
  Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 12:11 -0400
    Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 12:56 -0400
  Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? markspace <-@.> - 2011-10-10 09:12 -0700
    Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Patricia Shanahan <pats@acm.org> - 2011-10-10 09:31 -0700
      Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Lew <lewbloch@gmail.com> - 2011-10-10 12:12 -0700
        Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-10-10 13:32 -0700
          Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-10 16:40 -0400
          Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Lew <lewbloch@gmail.com> - 2011-10-10 14:29 -0700
  Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Screamin Lord Byron <scre@min.dot> - 2011-10-10 19:07 +0200
  Re: What Does it Mean to Pass a Generic Class Itself as a Parameter? Jeff Higgins <jeff@invalid.invalid> - 2011-10-11 02:08 -0400

csiph-web