Version française
Home     About     Download     Resources     Contact us    
Browse thread
Which syntax to teach ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Re: Which syntax to teach ?

Le 30 oct. 07 à 17:26, Chung-chieh Shan a écrit :

> Any tips on how (and perhaps how not) to teach functors?

Once they know what polymorphism is, make them realize it is  
sometimes useful, to write generic code, to be able to assume the  
existence of certain operations on a polymorphic type variable. But  
polymorphism doesn't allow this. Introduce functors as the way of  
acheiving this, i.e. the way to abstract a type with particular  
operations from a module implementation.

Best,

Daniel