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 SAA24055 for caml-redistribution; Mon, 6 Sep 1999 18:18:30 +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 UAA24319 for ; Sat, 4 Sep 1999 20:52:18 +0200 (MET DST) Received: from iggy.triode.net.au (iggy.triode.net.au [203.63.235.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA17351 for ; Sat, 4 Sep 1999 20:52:14 +0200 (MET DST) Received: from egret (pm1-20.triode.net.au [203.63.235.36]) by iggy.triode.net.au (8.9.3/8.8.8) with SMTP id EAA15528; Sun, 5 Sep 1999 04:45:10 +1000 Message-Id: <3.0.6.32.19990903154205.0096e240@mail.triode.net.au> X-Sender: skaller@mail.triode.net.au X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Fri, 03 Sep 1999 15:42:05 +1000 To: John Prevost From: John Skaller Subject: Re: convincing management to switch to Ocaml Cc: caml-list@inria.fr In-Reply-To: References: <199908300802.KAA15269@pauillac.inria.fr> <3.0.6.32.19990831151948.00971280@mail.triode.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: weis At 02:35 31/08/99 -0400, John Prevost wrote: >In some ways, this isn't really a problem--one of the big pieces of >utility in the ML family of languages is that type inference allows >you to leave out such type signatures. And explicit signatures for >modules takes care of the general case. > >So, it's sort of an obscure problem. I find the 'utility' of type inference more limited. For many functions, I want to declare the type, to make the program more readable and reduce the scope of type errors. (Since ocaml does 'inference first', then checks constraints, this second technique I'm all too familiar with from using languages using explicit typing, doesn't work so well). In any case, for me at least, it is not an obsure problem, and I thank you at for exhibiting alternate syntax forms that will ease the burden of declaring families of functions. The case arises naturally in providing an Ocaml/Python binding, the python builtin functions and methods -- and there are lots of them -- are ocaml functions with a fixed type. It is therefore natural to want to abbreviate the declarations: in the interface, the types are trivially given by val f : t and now, in the body by let (f:t) = fun a b c d e -> body which saves annotating each argument, which is a pain because the names of the parameter types are long, my previous style requiring a line each parameter (instead of one line per function). ------------------------------------------------------- John Skaller email: skaller@maxtal.com.au http://www.maxtal.com.au/~skaller phone: 61-2-96600850 snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia