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 QAA18181; Thu, 24 Jun 2004 16:27:37 +0200 (MET DST) 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 QAA17048 for ; Thu, 24 Jun 2004 16:27:36 +0200 (MET DST) Received: from salt.cs.brown.edu (salt-dmz.cs.brown.edu [128.148.32.122]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5OERYEV020569 for ; Thu, 24 Jun 2004 16:27:35 +0200 Received: from localhost (localhost [127.0.0.1]) by salt.cs.brown.edu (Postfix) with ESMTP id 21BF7D86D4 for ; Thu, 24 Jun 2004 10:27:34 -0400 (EDT) Received: from salt.cs.brown.edu ([127.0.0.1]) by localhost (salt [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02325-08 for ; Thu, 24 Jun 2004 10:27:33 -0400 (EDT) Received: from null.cs.brown.edu (null.cs.brown.edu [128.148.38.190]) by salt.cs.brown.edu (Postfix) with ESMTP id BAACDD86C9 for ; Thu, 24 Jun 2004 10:27:33 -0400 (EDT) Received: from clark.cs.brown.edu (clark [128.148.31.45]) by null.cs.brown.edu (Postfix) with ESMTP id 902813CAA for ; Thu, 24 Jun 2004 10:27:33 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by clark.cs.brown.edu (Postfix) with ESMTP id 726CC10EF0D for ; Thu, 24 Jun 2004 10:27:33 -0400 (EDT) Received: from clark.cs.brown.edu ([127.0.0.1]) by localhost (clark [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00210-09 for ; Thu, 24 Jun 2004 10:27:33 -0400 (EDT) Received: from spikeshomepc (meylan-1-82-225-49-106.fbx.proxad.net [82.225.49.106]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by clark.cs.brown.edu (Postfix) with ESMTP id 9767110EF06 for ; Thu, 24 Jun 2004 10:27:32 -0400 (EDT) Reply-To: From: "John Hughes" To: "'caml-list'" Subject: RE: [Caml-list] Why must types be always defined at the top level? Date: Thu, 24 Jun 2004 16:27:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 In-Reply-To: <1088023950.1941.98.camel@pelican.wigram> Thread-Index: AcRZZF57HFQ3OG1DTTibkIswedIn9wAht9Uw Message-Id: <20040624142732.9767110EF06@clark.cs.brown.edu> X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at cs.brown.edu X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at cs.brown.edu X-Miltered: at nez-perce with ID 40DAE4D6.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 revise:01 semicolons:01 ocaml:01 equality:01 equality:01 sml:01 sml:01 float:02 type-checker:02 types:03 types:03 let:04 let:04 motivation:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk As I revise my course notes from SML/NJ to OCaml, I find myself asking some design questions --- "Why did they do it THIS way?". I should probably ask "Why is this way the right way to do it, regardless of the original motivation?," but let's assume the answers are the same. 1. Why no eqtypes? The idea of having the type-checker verify that you weren't doing equality testing on non-equality-testable types seemed like GOOD thing in SML, and I was surprised to see it gone. 2. Why no "end" on "let" expressions, i.e., let a = 3 and b = 2 in a + b;; rather than let a = 3 and b = 2 in a + b end; ? 3. Why semicolons for separating list items, so that [2,3] is interpreted as [(2,3)] ? 4. Why expose the hardware with float (and make it have equality testing) rather than continue with "real" (which was not an eqtype, if I recally correctly)? ------------ I'm sure these were all good decisions, but I'd like to better understand them. -John Hughes ------------------- 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