Xref: utzoo comp.lang.eiffel:475 comp.lang.c++:5291 Path: utzoo!utgpu!watmath!att!dptg!pegasus!psrc From: psrc@pegasus.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.lang.eiffel,comp.lang.c++ Subject: Re: Interface between Eiffel and C++ Summary: bad news Message-ID: <4210@pegasus.ATT.COM> Date: 29 Oct 89 21:41:10 GMT References: <1989Oct27.205448.8516@mentor.com> Organization: AT&T Bell Laboratories Lines: 35 In article <1989Oct27.205448.8516@mentor.com>, lisch@mentor.com (Ray Lischner) writes: > How easy is it to design an interface between C++ and Eiffel? Not very. Bear in mind that both usually produce C as an "assembler language". For better or worse, C++ usually produces C code that is relatively similar in structure to the C++ code; I don't think this is the case for the current Eiffel implementation. > Specifically, we would need to call C++ functions from Eiffel, > so how can one get Eiffel to understand C++ name mangling? >... > We would also need to call Eiffel routines from C++, and I know > that extern "Eiffel" does not exist. So far as I know, the only way to do either would be through an intermediary C function. > The big problem, I suppose, would be making class definitions from > one language available in the other, but there is the problem of C++ > virtual functions and base classes, etc., etc., etc. (No kidding.-) C++ programs can directly use C header files with struct, union, and typedef definitions. The early implementations of Eiffel only allowed passing primitive types (integers, maybe char pointers) to C functions. I think the current implementation promises to do a little more, but I don't know the details. No C compiler can understand C++ or Eiffel class definitions. That's what "upward but not downward compatible" means, right? > Ray Lischner UUCP: {uunet,tektronix,decwrl}!sequent!mntgfx!lisch Paul S. R. Chisholm, AT&T Bell Laboratories att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.