Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 01D6C391B for ; Wed, 4 May 2011 18:57:03 +0000 (UTC) Received: (qmail 15715 invoked by uid 500); 4 May 2011 18:57:02 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 15625 invoked by uid 500); 4 May 2011 18:57:02 -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 15617 invoked by uid 99); 4 May 2011 18:57:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 18:57:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of garydgregory@gmail.com designates 209.85.161.43 as permitted sender) Received: from [209.85.161.43] (HELO mail-fx0-f43.google.com) (209.85.161.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2011 18:56:56 +0000 Received: by fxm3 with SMTP id 3so1185143fxm.30 for ; Wed, 04 May 2011 11:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=Ur3cnQbhJ419Hfm4UcvFvVUT5GNzkTg8eUPMKP7Q/uM=; b=WNM57QS5DWsweaPfTDDGlPZ2baR43LOO5NmRzlGecFaMr0yB/CmQ2ry6hFu8qUdLzA RbhLfI1NIwofFfQAEC6pvwe4PWOpUbUFQEtiOsh3mX/ZI264wXFbg6vN/uct3GItHe4e Yqg97Hx5+R7cItxd6EYDmaABhJuJxsqzq8d8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RXBAuqTzpKgwz2AofxZVb3gG8m5nqoMBgOMM0G8lJ9Ct/4aG4sjsnIPYSuu3cUDOrV kj447ohP5Q7v9yRHqjlEyk4oknDdeCfNC6YlRWOmDNjNZY6hJjPh4fWW6vpYszwts5Sk uIO2CWjFUUPcwKi/GvQx8MFrlFdzbBUwSZAM0= MIME-Version: 1.0 Received: by 10.223.1.76 with SMTP id 12mr251614fae.118.1304535396112; Wed, 04 May 2011 11:56:36 -0700 (PDT) Received: by 10.223.121.15 with HTTP; Wed, 4 May 2011 11:56:36 -0700 (PDT) In-Reply-To: References: Date: Wed, 4 May 2011 14:56:36 -0400 Message-ID: Subject: Re: [lang] Pair names still not right or consistent From: Gary Gregory To: Commons Developers List , gudnabrsam@gmail.com Content-Type: multipart/alternative; boundary=20cf3054a887e1df7b04a277d0fa X-Virus-Checked: Checked by ClamAV on apache.org --20cf3054a887e1df7b04a277d0fa Content-Type: text/plain; charset=UTF-8 On Wed, May 4, 2011 at 2:48 PM, Matt Benson wrote: > On Wed, May 4, 2011 at 12:45 PM, Gary Gregory > wrote: > > On Wed, May 4, 2011 at 1:04 PM, Stephen Colebourne >wrote: > > > >> On 4 May 2011 17:58, Gary Gregory wrote: > >> > I think we still have naming problems with the Pair class reflected in > >> this > >> > Javadoc fragment: > >> > > >> > * @param the first element type > >> > * @param the second element type > >> > > >> > Either we call them L left and R right, or we call them F first and S > >> > second, but mixing both is not good IMO. > >> > > >> > My preference is for K key and V value. > >> > >> Key and value implies a relationship between the two parts of the pair > >> (the key somehow describes the value), which we cannot do > >> (implementing Map.Entry is for convenience, not for any other reason). > >> Either first/second or left/right are valid choices. At OpenGamma we > >> use first/second but are able to change to left/right if this class is > >> released. > >> > > > > I think I like first and second better because we are in a package called > > tuple after all. > > > > When I see left and right, I think of assignments. Why not top and bottom > > too then? Just kidding. > > > > Dee and Dum, ad nauseum... left/right sit nicely with me as I don't > place any real priority of one element over the other, which I think > numeric names denote. I think I like them for their monosyllabicity > as well. That said, http://en.wikipedia.org/wiki/Tuple defines a > tuple's elements as being ordered, thus invalidating half of my > argument. Are there any equivalents to first/second that are nice and > short? > One, Two? G > > Matt > > > > >> > >> > I still do not like Pair as a name because a pair is: two identical, > >> > similar, or corresponding things that are matched for use together: a > >> pair > >> > of gloves; a pair of earrings. > >> > (http://dictionary.reference.com/browse/pair) > >> > > >> > We clearly break this common sense definition. > >> > >> I understand that from an English language POV, but Java devs all over > >> know this as a pair. No other name will do I'm afraid. > >> > > > > I'll let it be then. > > > > Gary > > > >> > >> Stephen > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > >> For additional commands, e-mail: dev-help@commons.apache.org > >> > >> > > > > > > -- > > 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 > > -- Thank you, Gary http://garygregory.wordpress.com/ http://garygregory.com/ http://people.apache.org/~ggregory/ http://twitter.com/GaryGregory --20cf3054a887e1df7b04a277d0fa--