Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: 4ndre4 <626401fd-4bc7-4f8f-b641-563ae0f72920@626401fd-4bc7-4f8f-b641-563ae0f72920.invalid> Newsgroups: comp.lang.java.programmer Subject: Re: double == double Date: Sun, 16 Oct 2016 16:43:03 +0100 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: <8737k0qd38.fsf@golem.phantasia.org> <87zim5es30.fsf@golem.phantasia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 16 Oct 2016 15:42:47 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="917f255bfc34919e5a39afd079f17297"; logging-data="4508"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Cq4krfLJsIjrYVYUpYofR" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 In-Reply-To: Cancel-Lock: sha1:1nxjnc9aijLXaqn0y+5jRISbpng= Xref: csiph.com comp.lang.java.programmer:35786 On 16/10/2016 16:24, Arne Vajhøj wrote: [...] > The model for dates in Java which you seem to suggest for version numbers. Sorry, you seem to miss the point here (or maybe it's me?) You stated that you don't think that double nor String are good choices for version numbers. There's no logical reason to believe that, IMO. Strings are as good as double for version numbers, as long as you know the semantics of your values and hence you know how to process them. Your StringVersion and DoubleVersion classes, for example, could implement Comparator and its compare() and equals() methods. I don't see why that would be a problem. The only reason I would not use a double for a version number is because, on a general principle, I don't like using inherently imprecise data structures to represent precise information. -- 4ndre4