lisch@mentor.com (Ray Lischner) (10/28/89)
My employer mandates the use of C++, but I am interested in looking at other OO languages, especially Eiffel. Before I can even think about mentioning any language other than C++, I will need to address some basic interface questions (politics, sigh...): How easy is it to design an interface between C++ and Eiffel? 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. 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. Thank you for any help you can offer. -- Ray Lischner UUCP: {uunet,tektronix,decwrl}!sequent!mntgfx!lisch
psrc@pegasus.ATT.COM (Paul S. R. Chisholm) (10/30/89)
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.