Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Help with Deck of cards assignment and getting it to deal... Date: Sun, 07 Sep 2014 22:13:51 -0400 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: <53de8cd5$0$299$14726298@news.sunsite.dk> <53dea33b$0$292$14726298@news.sunsite.dk> <53f3c592$0$300$14726298@news.sunsite.dk> <540d0a27$0$291$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 8 Sep 2014 02:13:51 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="25397"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UcXugkJmVsXp5hAtVuHYs" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 In-Reply-To: <540d0a27$0$291$14726298@news.sunsite.dk> Cancel-Lock: sha1:bCS2lglu0/0y1+N8DfHgQwqE0AU= Xref: csiph.com comp.lang.java.programmer:29931 On 9/7/2014 9:45 PM, Arne Vajhøj wrote: > On 8/20/2014 5:50 AM, Chris Uppal wrote: >> Arne Vajhøj wrote: >>>> How about: "Because making it easier to get things wrong than to get >>>> things right is rarely a good idea" ? >>> >>> You think that because Card is Comparable<> then people would mess up >>> the core game logic of comparing hands? >>> >>> I am not so worried about that. That is one thing that will typical >>> be very well-defined in the game rules. >> >> What I'd expect to see is people attempting to use the Comparable<> >> interface >> regardless of the game rules. And then patching their logic with ad-hoc >> special cases when they realised that the pre-defined Comparable<> >> didn't do >> exactly what the rules require. >> >> Better not to set traps for the unwary. > > Avoid adding stuff that could be used wrong seems as a hopeless > strategy to me. Avoiding stuff that is seldom right seems worth while, though. -- esosman@comcast-dot-net.invalid