From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 43F15BC88 for ; Tue, 1 Feb 2005 07:57:46 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j116vjka005910 for ; Tue, 1 Feb 2005 07:57:45 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA15386 for ; Tue, 1 Feb 2005 07:57:45 +0100 (MET) Received: from gum.itee.uq.edu.au (gum.itee.uq.edu.au [130.102.66.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j116vg9Y031213 for ; Tue, 1 Feb 2005 07:57:44 +0100 Received: from nut.itee.uq.edu.au (nut.itee.uq.edu.au [130.102.66.13]) by gum.itee.uq.edu.au (8.12.10/8.12.10) with ESMTP id j116vWVY000995; Tue, 1 Feb 2005 16:57:32 +1000 (EST) Received: from [130.102.66.112] (rcole@g613-8948.itee.uq.edu.au [130.102.66.112]) by nut.itee.uq.edu.au (8.12.10/8.12.9) with ESMTP id j116vWom026503; Tue, 1 Feb 2005 16:57:32 +1000 (EST) Message-ID: <41FF2831.40909@itee.uq.edu.au> Date: Tue, 01 Feb 2005 16:56:49 +1000 From: Richard Cole User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 X-Accept-Language: en MIME-Version: 1.0 To: Philippe Fremy Cc: caml-list@inria.fr Subject: Re: [Caml-list] type inference for python References: <41FF1305.30308@inseal.com> In-Reply-To: <41FF1305.30308@inseal.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.35 X-Miltered: at nez-perce with ID 41FF2869.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41FF2866.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 inference:01 wrote:01 inference:01 ocaml:01 pointers:01 ocaml:01 interfaces:01 interfaces:01 bin:01 motivation:01 caml:02 guess:02 alexander:02 python:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Philippe Fremy wrote: > > Hi, > > I would like to implement something similar to the type inference of > ocaml for the python language. I have always found it very impressive > (although I have only used caml light). > > I have no experience with the topic, it is just a project that seems > cool to me :-) Yeah me too :) Checkout "Demand-Driven Type Inference with Subgoal Pruning: Trading Precision for Scalability." by Alexander Spoon. Google can finds the paper if you type in the title. This paper gives a nice description of why type inference is hard thing to do in a dynamicly typed OO language like Python (aka smalltalk) and gives pointers to some work in the area including Cecile and Squeak. There was a later paper published by the same author in 04 but its not on the web yet :( I spent a little time considering adding interfaces to Ruby [http://kvo.itee.uq.edu.au/twiki/bin/view/Main/RjBlog39] which is pretty similar to Python, I guess. The main motivation for me, in adding interfaces to a language like Ruby, is to make the software structure explicit, and to give coders a place to document contracts that are shared by a number of classes. So I don't mind if the type inference isn't complete in the sense that every variable gets assigned some sort of minimal type. I'm sure one of the Ocaml guys can give you a list of references to the ML type system. Is there a canonical reference of the Ocaml type system? regards, Richard.