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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 87F0BBC6B for ; Tue, 30 Oct 2007 19:56:24 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAGsaJ0fDuhJBnmdsb2JhbACOYQIBAQcCCBEY X-IronPort-AV: E=Sophos;i="4.21,348,1188770400"; d="scan'208";a="3848604" Received: from mail19.bluewin.ch ([195.186.18.65]) by mail1-smtp-roc.national.inria.fr with ESMTP; 30 Oct 2007 19:56:24 +0100 Received: from [192.168.1.58] (85.2.53.111) by mail19.bluewin.ch (Bluewin 7.3.121) id 471B45000027D222 for caml-list@yquem.inria.fr; Tue, 30 Oct 2007 18:56:23 +0000 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <5i2kv4-hmj.ln1@mantle.rutgers.edu> References: <1193225773.3612.27.camel@Blefuscu> <471F7F7B.9040905@fmf.uni-lj.si> <666572260710241205x19edbd4ar840811b1d7a7315f@mail.gmail.com> <5i2kv4-hmj.ln1@mantle.rutgers.edu> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <8AF84121-F7DD-4335-A1F0-35851DF4240A@erratique.ch> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: Re: [Caml-list] Re: Which syntax to teach ? Date: Tue, 30 Oct 2007 19:56:42 +0100 To: caml-list caml-list X-Mailer: Apple Mail (2.752.2) X-Spam: no; 0.00; bunzli:01 buenzli:01 syntax:01 functors:01 polymorphism:01 polymorphism:01 functors:01 26,:98 polymorphic:01 abstract:01 caml-list:01 module:03 daniel:04 daniel:04 perhaps:05 Le 30 oct. 07 =E0 17:26, Chung-chieh Shan a =E9crit : > Any tips on how (and perhaps how not) to teach functors? Once they know what polymorphism is, make them realize it is =20 sometimes useful, to write generic code, to be able to assume the =20 existence of certain operations on a polymorphic type variable. But =20 polymorphism doesn't allow this. Introduce functors as the way of =20 acheiving this, i.e. the way to abstract a type with particular =20 operations from a module implementation. Best, Daniel