Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] C++ templates to OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Carette <carette@m...>
Subject: Re: [Caml-list] C++ templates to OCaml
Jonathan Roewen <jonathan.roewen@gmail.com> wrote:
> 
> What's the best way to imitate C++ templates in OCaml? 

<plug>
I have been quite successful at doing C++ template-like things in MetaOCaml.

In fact, using Functors and Modules judisciously, it is possible to hide all of the code-generation aspects and write 
quite straightforward code that can be instantiated in many different ways.

An earlier version of this work (joint with Oleg Kiselyov) is available at 
http://www.cas.mcmaster.ca/~carette/metamonads/, and has been accepted at GPCE 2005.
</plug>

Thanks for asking ;-)

Jacques