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 AAA11757; Sun, 29 Sep 2002 00:01:19 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA11869 for ; Sun, 29 Sep 2002 00:01:18 +0200 (MET DST) Received: from bastion.artisan.com (bastion.artisan.com [209.144.161.130]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g8SM1H502877 for ; Sun, 29 Sep 2002 00:01:17 +0200 (MET DST) Received: from ypmaster.artisan.com (ypmaster [172.16.2.1]) by bastion.artisan.com (8.9.2/8.9.2) with ESMTP id PAA27048 for ; Sat, 28 Sep 2002 15:01:15 -0700 (PDT) Received: from spike.artisan.com (spike [172.16.10.92]) by ypmaster.artisan.com (8.9.2/8.9.2-arti) with ESMTP id PAA12001 for ; Sat, 28 Sep 2002 15:01:15 -0700 (PDT) Received: (from johnm@localhost) by spike.artisan.com (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id g8SM1EO04978; Sat, 28 Sep 2002 15:01:14 -0700 From: John Gerard Malecki MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15766.9898.869203.134558@spike.artisan.com> Date: Sat, 28 Sep 2002 15:01:14 -0700 To: caml-list@inria.fr Subject: Re: [Caml-list] Design advice In-Reply-To: <20020928190216.GA9876@force.stwing.upenn.edu> References: <4.3.2.7.2.20020928033941.03b2eb10@mail.d6.com> <20020928190216.GA9876@force.stwing.upenn.edu> X-Mailer: VM 7.07 under Emacs 21.2.1 Reply-To: "John Gerard Malecki" X-Organization: Artisan Components, Inc. Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This thread reminds me to ask if are there any guarantees for ordering of variant types? Although the implementation indicates that with type card = Number of int | Jack | Queen | King | Ace Jack < Queen and Queen < King it also says that Ace < Number 0. I can see what is going on with the implementation. I'm curious if there are any ordering guarantees that I can take advantage of? Since the documentation is silent on this point I doubt it. Oh, It does seems as if tuples, arrays and lists are always compared "from left to right". This can be handy when sorting multi- dimensional data. This seems like a "more natural" ordering than for variants but, once again, can this ordering be guaranteed for all ocaml programs? ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners