From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA27684; Thu, 15 Jan 2004 09:37:23 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA28111 for ; Thu, 15 Jan 2004 09:37:22 +0100 (MET) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i0F8bL513547 for ; Thu, 15 Jan 2004 09:37:21 +0100 (MET) Received: from univ-savoie.fr (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id i0F8aw7S025159 ; Thu, 15 Jan 2004 09:36:58 +0100 Message-ID: <40065134.7000402@univ-savoie.fr> Date: Thu, 15 Jan 2004 09:37:08 +0100 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Hurt CC: skaller , Ocaml Mailing List Subject: Re: [Caml-list] Stupid question References: In-Reply-To: X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; raffalli:01 raffalli:01 univ-savoie:01 caml-list:01 stupid:01 inequality:01 habit:01 savoie:01 chablais:01 73376:01 univ-savoie:01 lama:01 enigmail:01 mutt:01 compiler:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Hurt wrote: > On 15 Jan 2004, skaller wrote: > > >>Well, <> is a polymorphic value comparison. >>Whereas != is a physical inequality comparison. > > > Yes. I was wondering why the compiler didn't catch that I was comparing > booleans and thus it could inline the value comparison, and reduce it to > the equivelent to !=. I've gotten into the habit of writting <> because > I'm playing around with FP, and 1. <> 1. is false, while 1. != 1. is true. > Usually it is good to avoid comparing float with = and <> ... |a-b|