Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.sprintlink.net!EU.net!julienas!news.fnet.fr!ilog!news
From: davis@ilog.fr (Harley Davis)
Subject: Re: Fortran interface for Gwydion/Dylan?
In-Reply-To: Erik Naggum's message of 21 Nov 1994 20:00:58 UT
Message-ID: <DAVIS.94Nov22095255@passy.ilog.fr>
Lines: 42
Sender: news@ilog.fr
Nntp-Posting-Host: passy
Organization: Ilog SA, Gentilly, France
References: <ROGOFF.94Nov18162520@sccm.Stanford.EDU> <3akavb$h0a@cantaloupe.srv.cs.cmu.edu>
	<19941121T200059Z.enag@ifi.uio.no>
Date: 22 Nov 1994 08:52:54 GMT


In article <19941121T200059Z.enag@ifi.uio.no> Erik Naggum <enag@ifi.uio.no> writes:

   [Scott Fahlman]

   |   We know that we will *need* C and C++ interfaces (though the latter is
   |   difficult).

   which compiler(s) and which version(s) of which compiler(s) of C++ will you
   support?  no two vendors/producers can agree on the language, much less a
   common naming scheme, and unless you extern "C" everything, you don't
   really get anything you can rely on vis-a-vis external appearance.

The approach we use in the automatic C++ interface for Ilog Talk is to
generate stubs with our own name mangling scheme which call C++
routines, and then to use extern "C" on them.  This makes the
interface portable across all C++ compilers.  You can read more about
our approach in our L&FP '94 paper "Sweet Harmony: The Talk/C++
Connection", available via our WWW page http://www.ilog.fr, or by
writing to info@ilog.com.

   may I suggest that you wait with the C++ foreign function call or interface
   until the language at least has settled down a bit, and perhaps reached
   such closure that we can speak of one or at least a small set of generally
   accepted naming (name mangling) scheme for externally visible identifiers?
   the problem is, as I see it, that C++ doesn't have a foreign function
   interface except to C (where "foreign" also means "another version
   of C++").

There's no reason to wait if you want to integrate C++ libraries into
an object-oriented dynamic language.

-- Harley Davis
-- 

------------------------------------------------------------------------------
Harley Davis                            net: davis@ilog.fr
ILOG S.A.                               tel: +33 1 46 63 66 66
2 Avenue Gallini, BP 85                fax: +33 1 46 63 15 82
94253 Gentilly Cedex, France            url: http://www.ilog.fr/

           Ilog Talk information: info@ilog.com
