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 EAA19763; Sat, 14 Jul 2001 04:05:06 +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 EAA19895 for ; Sat, 14 Jul 2001 04:05:03 +0200 (MET DST) Received: from localhost.localdomain (cartman103.zip.com.au [61.8.20.231]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6E250j25794 for ; Sat, 14 Jul 2001 04:05:01 +0200 (MET DST) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id MAA32132; Sat, 14 Jul 2001 12:04:50 +1000 Message-ID: <3B4FA8C2.57FCDD80@maxtal.com.au> Date: Sat, 14 Jul 2001 12:04:50 +1000 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: "Krishnaswami, Neel" CC: caml-list@inria.fr Subject: Re: [Caml-list] A G'Caml question" + additional info References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk "Krishnaswami, Neel" wrote: > Permit me to disagree. I find nearly all of OCaml's features highly > useful and orthogonal, and I am only working on medium size projects. I don't find that is entirely true. First, there is quite a bit of sugar, such as fun/function/match, if then else vs. matching. Then, there are duplicated facilities: tuples and records, standard variants and polymorphic ones. Then classes and modules overlap. Oh, and labelled arguments or not. To currify a function or use a tuple . Some syntax cannot be used as the basic grammar would suggest, and the constraints aren't documented. For example, you can write: let x,y,z = (1,2,3) let Some x = Some 1 let (Some x) as y = Some 1 but not let (Some x) when true = Some 1 I'd give examples from the module system, if only I understood how to use it properly. In classes, you can write: x <- y for 'assignment', but you have to write x := y for a reference in ordinary code. Many library components have both a functorial and polymorphic interface. There are two versions of some libraries (Unix, ThreadUnix). Some of the libraries seem deficient (Str). Then, there is a duplication of tools (native code and bytecode compilers), label or standard mode. The interaction of all these features with the type system, particularly type inference, makes for some really daunting error messages. I'm NOT complaining, just disagreeing. In my current project, I've been sticking to the basic feature set. But I'm stronly tempted to switch to polymorphic variants, because they'd provide much better typing for my application. But I'm scared that I won't be able to understand the error messages, and quite concerned that there's no way to catch spelling mistakes. [Something which declared the variant names would be useful] Switching over, to an _isomorphic_ program -- a mechanical task -- will requires an almost complete rewrite, by hand. There's no question that I have a difficult choice between two non-orthogonal features. I'm glad to have the choice -- its much better than being stuck in C++ without any representation of sums :-) -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr