From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA01185; Tue, 22 Jun 2004 13:43:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA01166 for ; Tue, 22 Jun 2004 13:43:21 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from eposta.kablonet.com.tr ([62.248.102.66]) by concorde.inria.fr (8.12.10/8.12.10) with SMTP id i5MBhISH019363 for ; Tue, 22 Jun 2004 13:43:19 +0200 Received: (qmail 79842 invoked by uid 1007); 22 Jun 2004 11:23:24 -0000 Received: from exa@kablonet.com.tr by eposta.kablonet.com.tr by uid 0 with qmail-scanner-1.21 (clamdscan: 0.70-rc. Clear:RC:0(81.214.24.132):. Processed in 0.324922 secs); 22 Jun 2004 11:23:24 -0000 Received: from unknown (HELO orion) (exa@kablonet.com.tr@81.214.24.132) by 0 with SMTP; 22 Jun 2004 11:23:23 -0000 From: Eray Ozkural Reply-To: erayo@cs.bilkent.edu.tr Organization: Bilkent University CS Dept. To: art yerkes Subject: Re: [Caml-list] Interface between Ocaml and C++ Date: Tue, 22 Jun 2004 14:14:04 +0300 User-Agent: KMail/1.6.51 Cc: gnu04@yahoo.com, caml-list@inria.fr References: <20040619045605.16162.qmail@web60908.mail.yahoo.com> <200406212224.07538.exa@kablonet.com.tr> <20040622014143.6e6870ab.ayerkes@speakeasy.net> In-Reply-To: <20040622014143.6e6870ab.ayerkes@speakeasy.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406221414.04909.exa@kablonet.com.tr> X-Miltered: at concorde with ID 40D81B56.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; eray:01 ozkural:01 caml-list:01 2004:99 yerkes:01 2004:99 eray:01 ozkural:01 yerkes:01 swig:01 swig:01 stub:01 generic:01 kde:01 erayo:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tuesday 22 June 2004 09:41, art yerkes wrote: > On Mon, 21 Jun 2004 22:24:07 +0300 > > Eray Ozkural wrote: > > On Saturday 19 June 2004 10:29, art yerkes wrote: > > > The SWIG module for Ocaml has support for a few STL > > > types. If you use those interfaces as a guide, you > > > could add support for more if the automatic wrapping > > > doesn't suit. > > > > > > SWIG isn't perfect for everyone but some needs are > > > met very well, including using templates. > > > > > > Look at http://www.swig.org/ > > > > How does it handle convert C++ templates to ocaml code, I wonder. I had a > > design in my mind, but it required quite a bit of monkeying around. > > What's their solution? > > The current solution is to specify which specializations of a given > template will be needed, after which the specialized template classes are > treated as ordinary classes. OK. Imagine client ocaml code that uses template class C < T >. I had imagined that the specializations in the ocaml code ( C < int >, C < vector >, ... ) could be determined automatically, after which the specializations are generated in C++ stub code, and linked in... So I guess I had in mind a more generic version of SWIG's approach, however I doubt this won't be a good mapping.... Can you guys imagine any other alternatives, or should we avoid templates in C++ libraries that want an ocaml binding (like KDE) ? Cheers, -- Eray Ozkural (exa) 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