Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 21 Dec 2012 02:58:56 -0600 Date: Fri, 21 Dec 2012 08:58:54 +0000 From: lipska the kat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: proper use of .java files (layout) References: <50cfcd0b$0$293$14726298@news.sunsite.dk> <50cfd4b9$0$295$14726298@news.sunsite.dk> <50d112a1$0$283$14726298@news.sunsite.dk> <8u04d8dua5rrdshc39ut9ar4lc682hb15u@4ax.com> <50d25949$0$286$14726298@news.sunsite.dk> <3h07d81eh28qlu7q8v5fp7ugse6e2u45s3@4ax.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 40 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-pFJ+V9u0AuaJlyhSKZzoHR/8MfsgWyJYf/QvSL4v5cIX9WHXzrGdrNBKl3PJsyZwEyXugVYKuLsTHEH!+LVlxWTTE5jO6MV4L4b1g2fP/TQoXnuORh7pgvXsJW4OhgmmNsC+Wm5G4hW74Mq6aj6fxdsB6+8= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3426 Xref: csiph.com comp.lang.java.programmer:20655 On 20/12/12 22:00, Patricia Shanahan wrote: > On 12/20/2012 1:35 PM, Gene Wirchenko wrote: >> On Thu, 20 Dec 2012 09:30:09 -0800, Patricia Shanahan > ... >>> Perhaps more importantly, why do we need an order? >> >> Many card games require order to rank hands or determine which >> card beats which. > > I agree that a game may require and impose an order, but each game's > order is different. Indeed, the order can even change during a game. For > example, the ranking for winning trick in a bridge game depends on the > contract and the suit of the trick's lead card. > > I expect many games to declare and use a Comparator. I'm > suggesting that Card should not itself be Comparable. > A Comparator is an abstraction of what we as human beings do when we compare values. You can have a Comparator that compares in any way you want. A Comparator would effectively implement a sub set of the rules of the game. Seems a perfectly logical suggestion to me Once again if not a Comparator then what. It's all vary well playing devils advocate but sooner or later something actually needs to be written down. Asking 'why do we need an order' exposes either a surprisingly poor insight into a very common phenomena (the Playing Card/Card Game) or a pathalogical reluctance to commit oneself to a potential solution for fear of it being 'wrong' somewhere down the line. Object Oriented software engineering provides many mechanisms to deal with changing requirements, altered and enhanced insights and good old fashioned 'mistakes' Of course first you need to have the idea. lipska -- Lipska the KatŠ: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun