Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Interface between Ocaml and C++
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eray Ozkural <exa@k...>
Subject: Re: [Caml-list] Interface between Ocaml and C++
On Tuesday 22 June 2004 16:36, art yerkes wrote:
> In my experience, the C++ and ocaml type systems are different enough that
> determining specializations from caml code won't work well.
>
> Consider that:
>
> std::set<const char *>
> std::set<char [18]>
> std::set<std::string>
>
> are all different specializations of std::set on various representations of
> string in C++.  The syntax to choose among them may not be easy for a user
> to write and keep track of.

I agree. What's worse, these combinatorial types can accept only C++ types as 
parameters. How to reliably specify that in ocaml client code, it's almost 
impossible to know...

Maybe SWIG's approach is a good middleground then? But it makes me wonder, why 
should I want to use C++ stdlib if I have ocaml? >:-)

The alternative I thought was a syntax extension to handle it for class and 
function templates. But I don't think it's going to work out, either. 

Regards,

-- 
Eray Ozkural (exa) <erayo@cs.bilkent.edu.tr>
Comp. Sci. Dept., Bilkent University, Ankara  KDE Project: http://www.kde.org
http://www.cs.bilkent.edu.tr/~erayo  Malfunction: http://malfunct.iuma.com
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners