Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 82110 invoked from network); 12 Mar 2007 21:31:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2007 21:31:56 -0000 Received: (qmail 82502 invoked by uid 500); 12 Mar 2007 21:32:02 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 82435 invoked by uid 500); 12 Mar 2007 21:32:02 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 82414 invoked by uid 99); 12 Mar 2007 21:32:02 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2007 14:32:02 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of bnordgren@fs.fed.us designates 166.6.251.24 as permitted sender) Received: from [166.6.251.24] (HELO svpdxsmtp001.pdx.fs.fed.us) (166.6.251.24) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2007 14:31:51 -0700 Received: from ([166.7.3.111]) by svpdxsmtp001.pdx.fs.fed.us with ESMTP id KP-BRCGM.62194928; Mon, 12 Mar 2007 14:30:52 -0700 In-Reply-To: <45F5C19D.1030808@ptc.com> Subject: Re: [collections] VOTE: Collections-java5 direction To: "Jakarta Commons Developers List" X-Mailer: Lotus Notes Release 6.0.2CF2 July 23, 2003 Message-ID: From: Bryce L Nordgren Date: Mon, 12 Mar 2007 15:29:25 -0600 X-MIMETrack: Serialize by Router on ENTR1B/E/USDAFS(Release 6.5.4FP1HF140 | September 14, 2005) at 03/12/2007 15:33:07 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org Jess Holle wrote on 03/12/2007 03:09:49 PM: > Bryce L Nordgren wrote: > > Thing 2: (snipped) > > ======== > > Generics do not even > > contain a way to express "this collection is potentially composed of a > > mixture of elements, but every element is guaranteed to be between {Parent} > > and {Child} in the class hierarchy". In order to implement this type of > > checked behavior, Java Generics requires that we use the "unchecked" > > syntax. > > > You can express the bounds of , right? There's > even a more obscure syntax for expressing something that extends > multiple classes in cases. My fears have just been amplified by about an order of magnitude. Your expression does not repeat _NOT_ mean: "this collection is potentially composed of a mixture of elements, but every element is guaranteed to be between {Parent} and {Child} in the class hierarchy". It means "this collection contains elements all of the same type, and this type is guaranteed to be between {Parent} and {Child}." Use Java generics to express concepts that Java generics actually contains a vocabulary for. However, please do not exclude current functionality merely because Java generics cannot articulate the concept. Generics is a minefield. Please be extremely cautious. Bryce --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org