Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 28055 invoked from network); 12 Apr 2011 16:11:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 16:11:06 -0000 Received: (qmail 24715 invoked by uid 500); 12 Apr 2011 16:11:06 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 24610 invoked by uid 500); 12 Apr 2011 16:11:06 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 24602 invoked by uid 99); 12 Apr 2011 16:11:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 16:11:06 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gudnabrsam@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-ww0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 16:11:00 +0000 Received: by wwb39 with SMTP id 39so7553809wwb.6 for ; Tue, 12 Apr 2011 09:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=QXxCs3ioccJvpDdJP8YsemefW3kGMMhFpvDalKj11Ok=; b=rRh5ybQC8U8popiPorfF31FcoVDy2HjkmK32N2hQlfI2cTjqd7kC0UJQXaYrYCLD7u zzOP+f+xo0J0+WdOd6/ojnAlWpYw5p15wVJkwzKgPkeZD09nnOH2zesVoW2AzZ9ERJSs EzCTYc9rmaxTZXQda/uAUY8j1w3Fwjyts/dPg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=J+2dFvBJ/1PCX7zmCey7caBRqU3YsJVYuu9W6fd+SACc5nLr0u+T+p4LghTEmD3OvJ ABb+s+xluyHklo9vi6O9Hr7VztauY/FGm6wzbhbFbMGr0EeCGCeVW8UEvjnCwibwAJ1c slC9AHCRd8u+pq3qmqeBIqOoYSm55e8SsCUgo= MIME-Version: 1.0 Received: by 10.216.232.8 with SMTP id m8mr6495297weq.22.1302624639708; Tue, 12 Apr 2011 09:10:39 -0700 (PDT) Received: by 10.216.154.11 with HTTP; Tue, 12 Apr 2011 09:10:39 -0700 (PDT) Reply-To: gudnabrsam@gmail.com In-Reply-To: References: Date: Tue, 12 Apr 2011 11:10:39 -0500 Message-ID: Subject: Re: [lang] Pair vs. [collection] org.apache.commons.collections.keyvalue From: Matt Benson To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Apr 12, 2011 at 10:20 AM, Stephen Colebourne wrote: > The [collections] KeyValue class was a mistake. [lang] Pair is a > better more general concept. > > The only thing I'd consider with [lang] Pair now is whether it should > move to its own package, in case it grows later (primitive versions). > oacl.tuple? Matt > Stephen > > > On 11 April 2011 21:00, Matt Benson wrote: >> On Mon, Apr 11, 2011 at 1:31 PM, Gary Gregory w= rote: >>> Hi All: >>> >>> I am now realize that what we are stumbling along with Pair has already= been >>> done in org.apache.commons.collections.keyvalue, generics and all. Diff= erent >>> class names but the same ideas. >>> >>> So... it sure would be nice to avoid creating the same thing in [lang] = but >>> with different class names. >>> >>> What are our options: >>> - Continue blindly >>> - Converge both components on the same class names. [lang] has 3 classe= s, >>> [collections] has 8. >>> - Drop Pair in favor of org.apache.commons.collections.keyvalue. >>> >>> I feel we need a good story here before releasing 3.0 with 3 new Pair >>> classes. >>> >>> Thoughts? >> >> Remember that Pair, as originally added to the [lang] codebase, did >> not implement Map.Entry, nor did it support mutation, and that, being >> immutable, it didn't even provide accessor methods. =A0It was the >> simplest 2-valued tuple, or "pair", as was possible. =A0It was only at >> others' insistence that I modified the design to what currently >> resides in trunk (I would personally shed no tears over reverting back >> to the original code). =A0The generics branch of [collections] may or >> may not ever see release, but even assuming it will eventually do so I >> don't find it an unreasonable proposition that [lang] provide >> something so simple as a Pair. =A0In fact it makes perfect sense to me >> that the most-often used ancillary classes of other Commons components >> eventually find their way into [lang], whose mission it is to provide >> those indispensible items missing from the core APIs. =A0Conversely, the >> argument could be made that providing a KeyValue class with no >> collection- or map-related ideology attached is a case of >> [collections] overstepping *its* bounds. =A0In the end, [collections] >> and [lang] are "core" enough extensions that neither should depend on >> the other, even if that means they overlap a little at the edges. >> >> $0.02, >> Matt >> >>> >>> -- >>> Thank you, >>> Gary >>> >>> http://garygregory.wordpress.com/ >>> http://garygregory.com/ >>> http://people.apache.org/~ggregory/ >>> http://twitter.com/GaryGregory >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org >> For additional commands, e-mail: dev-help@commons.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org