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 TAA09054 for caml-red; Thu, 14 Dec 2000 19:15:28 +0100 (MET) 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 SAA04218 for ; Tue, 12 Dec 2000 18:44:35 +0100 (MET) Received: from localhost.localdomain (ppp208.dyn147.pacific.net.au [210.23.147.208]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eBCHiS511212 for ; Tue, 12 Dec 2000 18:44:29 +0100 (MET) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id EAA21556; Wed, 13 Dec 2000 04:43:17 +1100 Message-ID: <3A3663B5.412BECE2@ozemail.com.au> Date: Wed, 13 Dec 2000 04:43:17 +1100 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: Chet Murthy CC: Chris Hecker , Mattias Waldau , Caml-List Subject: Re: Same label in different types, how do people solve this? References: <4.3.2.7.2.20001211101656.00c12320@shell16.ba.best.com> <200012120325.WAA12331@bismarck-chet.watson.ibm.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Chet Murthy wrote: > The issue, about practicality, isn't whether you _can_ specify the > particular types and type-usages you want. The issue is whether, if > you write a phrase, and you got it wrong, you have to know all about > the type system, in order to debug that phrase. It is a tradeoff. Full inference makes code short: lack of inference severely pollutes programming style (as in C++). In Felix, I compromised: functions must be explicitly typed when declared, but values don't: function f(a:int): int { val b = a; return b; } f must be explicitly typed. The type of b is deduced. Compare with let f a = let b = a in b;; The explicit typing of functions avoids a need for a full scale type inference algorithm. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net