Article View: comp.lang.java
Article #274Re: Will Java kill C++?
From: Andrew Koenig
Date: Tue, 16 Apr 1996 12:55
Date: Tue, 16 Apr 1996 12:55
26 lines
1353 bytes
1353 bytes
In article <4ku4lk$lg6@engnews2.Eng.Sun.COM> linden@positive.Sun.COM (Peter van der Linden) writes:
> >How would you have maintained C-style linkage and C++ typesafe
> >linkage in the same object module without changing the linker?
> By writing a linker pre-pass program which checks for and enforces
> the type-safe linking rules.
But such a program (a) would have to be rewritten for every machine
to which C++ was ported, and (b) would not solve the problem of what
name to give the linker for overloaded functions with the same name.
For example, suppose one translation unit has
void f(int) { /* ... */ }
and another has
void f(double) { /* ... */ }
These two translation units are compiled separately. When compiling C++
into C, what names should the compiler give to the C versions of these functions
so that your hypothetical prelinker will be able to tell them apart?
--
--Andrew Koenig
ark@research.att.com
Technical Details
Message-ID:
<DpyH85.6uu@research.att.com>Path:
arc1-ca.pugleaf.net!in2.uu.net!allegra!alice!arkReferences:
<4ksfdr$bhh@engnews2.Eng.Sun.COM> <3172DC7C.6B3F@sdt.com> <4ku4lk$lg6@engnews2.Eng.Sun.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.java,comp.lang.c++ Path: arc1-ca.pugleaf.net!in2.uu.net!allegra!alice!ark From: ark@research.att.com (Andrew Koenig) Subject: Re: Will Java kill C++? Message-ID: <DpyH85.6uu@research.att.com> Organization: AT&T Research, Murray Hill NJ References: <4ksfdr$bhh@engnews2.Eng.Sun.COM> <3172DC7C.6B3F@sdt.com> <4ku4lk$lg6@engnews2.Eng.Sun.COM> Date: Tue, 16 Apr 1996 12:55:17 GMT