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 VAA00012 for caml-red; Sun, 22 Oct 2000 21:41:39 +0200 (MET DST) 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 UAA22803 for ; Sat, 21 Oct 2000 20:37:13 +0200 (MET DST) Received: from shell16.ba.best.com (shell16.ba.best.com [206.184.139.148]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id e9LIbCr13106; Sat, 21 Oct 2000 20:37:12 +0200 (MET DST) Received: from localhost (def6@localhost) by shell16.ba.best.com (8.9.3/8.9.2/best.sh) with ESMTP id LAA24100; Sat, 21 Oct 2000 11:37:11 -0700 (PDT) X-Authentication-Warning: shell16.ba.best.com: def6 owned process doing -bs Date: Sat, 21 Oct 2000 11:37:11 -0700 (PDT) From: Chris Hecker X-Sender: def6@shell16.ba.best.com To: Pierre Weis cc: caml-list@inria.fr Subject: Re: circular types? In-Reply-To: <200010210802.KAA17692@pauillac.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis@pauillac.inria.fr > By contrast if the recursivity has to spread over more than one > module, there is no solution in Caml. This is an active research area > to design a module system that supports this feature (the so-called > ``mixins''). Could you explain how this helps with mixin? My understanding of mixin is that you compose types such that you can easily add "printable" or "drawable" to an object in a lightweight way. Is this related in some way I don't see? Or, does mixin mean something different? Templates somewhat obviate the need for mixin, since "printable" just becomes a constraint that the type support the "print" function, "sortable" means the type has "<", etc. This is generic programming in the Stepanov sense. I still need to get my head around ocaml's generic programming constructs, though. It seems they're more powerful in some ways and less in others (since you can't overload, you can't write a single generic function that operates on any types that satisfy the constraints like you can in C++). I'm still trying to figure this out, though, so I could be mistaken. Chris