From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AWL,RCVD_IN_BL_SPAMCOP_NET autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 946D0BC69 for ; Thu, 22 Feb 2007 15:46:25 +0100 (CET) Received: from dedibox1.ambre.net (dedibox1.ambre.net [88.191.29.66]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1MEkPrU022668 for ; Thu, 22 Feb 2007 15:46:25 +0100 Received: from [81.185.99.54] (unknown [81.185.99.54]) by dedibox1.ambre.net (Postfix) with ESMTP id F1037C4000B for ; Thu, 22 Feb 2007 15:46:24 +0100 (CET) Message-ID: <45DDAC99.4090408@ens-lyon.org> Date: Thu, 22 Feb 2007 15:45:45 +0100 From: David Teller User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: A dynamic types simulator for teaching OCaml ? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 45DDACC1.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 ocaml:01 ocaml:01 untyped:01 checker:01 burnt:98 dynamically:01 manifest:01 tend:02 expression:02 exists:03 languages:03 dynamic:03 types:03 typed:03 As I've mentioned a few times, this term, I find myself teaching OCaml to second year students. One of the things they have trouble understanding is the role of the type system: in their mind, type errors tend to be "something that OCaml won't let them do" rather than "a likely error detected by OCaml in their design". In turn, I extrapolate that this this is one of the reasons for the success of dynamically-typed (if not fully untyped) languages: programmers don't feel constrained by an error checker they don't understand. After some thought, I believe that one good way of getting students to understand why the type system is good for them would be to let themselves get burnt by type errors a few time. In turn, if this is to be part of teaching OCaml, this would require a dynamically typed "simulator" for the language: an interpreter accepting any syntactically correct expression and executing it until a manifest type error, then displaying a nice, detailed explanation of what that error is all about. In other words, something like a Scheme interpreter with a nice pre-processor/pretty-printer. Does anyone know if such a tool already exists ? Thanks, David