Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 <> wrote:
> What's the best way to imitate C++ templates in OCaml? 

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, and has been accepted at GPCE 2005.

Thanks for asking ;-)