From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA13031 for caml-red; Sat, 3 Jun 2000 09:33:41 +0200 (MET DST) 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 SAA06138 for ; Thu, 1 Jun 2000 18:44:02 +0200 (MET DST) Received: from mrwall.kal.com (mrwall.kal.com [194.193.14.236]) by nez-perce.inria.fr (8.10.0/8.10.0) with SMTP id e51Gi1b29112; Thu, 1 Jun 2000 18:44:02 +0200 (MET DST) Received: from mrwall.kal.com [194.193.14.236] (HELO localhost) by mrwall.kal.com (AltaVista Mail V2.0J/2.0J BL25J listener) id 0000_0045_3936_92c9_0a8e; Thu, 01 Jun 2000 17:43:53 +0100 Received: from somewhere by smtpxd Message-ID: <3145774E67D8D111BE6E00C0DF418B6623BCEE@nt.kal.com> From: Dave Berry To: Pierre Weis Cc: caml-list@inria.fr Subject: RE: CamlTk and LablTk Date: Thu, 1 Jun 2000 17:44:37 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain; charset="iso-8859-1" Sender: weis (I hope you don't mind me replying to a fairly old message). This was a very interesting question, and the examples that Pierre included were illuminating. Would it be possible to elucidate a little further? In particular, I'd appreciate it if someone could give the types of the relevant functions in each library. (At some point one has to look at the documentation for all the details, but this seems like a reasonably educational example to take a little further). Let's compare the two calls to create_oval. First the Caml/TK: Canvas.create_oval c (Pixels (cx - wx)) (Pixels (cy - wy)) (Pixels (cx + wx)) (Pixels (cy + wy)) [Outline (NamedColor "black"); Width (Pixels 7); FillColor (NamedColor "white")] Second the Labl/TK: Canvas.create_oval ~x1:(cx - wx) ~y1:(cy - wy) ~x2:(cx + wx) ~y2:(cy + wy) ~outline: `Black ~width: 7 ~fill: `White It seems that Labl/TK is using labels in two ways. First, to have named arguments, so that you can see which position is x1, which is y1, etc. Second, to handle optional arguments. Where Caml/TK takes a list of attributes, Labl/TK takes extra parameters. I assume that this is where Labl/TK has better type checking. Does the type of each function list the optional parameters that it may take? : Doesn't this lead to large types for each function? (I don't know O'Labl at all well). Dave.