From 6251353480713727833
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ea96cc047f6a22cc
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-08-15 09:30:04 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: comeau@panix.com (Greg Comeau)
Newsgroups: comp.std.c++
Subject: Re: extern "C" -- what is the intent?
Date: Wed, 15 Aug 2001 16:29:26 GMT
Organization: Comeau Computing; http://www.comeaucomputing.com
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <9lckp7$bg5$1@panix3.panix.com>
References: <090820010209154805%BobbySchmidt@mac.com> <remove.haberg-1308011259440001@du132-226.ppp.su-anst.tninet.se> <9l8qvc$7ig$1@panix3.panix.com> <remove.haberg-1408010919180001@du136-226.ppp.su-anst.tninet.se>
Reply-To: comeau@comeaucomputing.com
X-Trace: mail2news.demon.co.uk 997892979 mail2news:27413 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Lines: 46
Xref: archiver1.google.com comp.std.c++:6993

In article <remove.haberg-1408010919180001@du136-226.ppp.su-anst.tninet.se>,
Hans Aberg <remove.haberg@matematik.su.se> wrote:
>In article <9l8qvc$7ig$1@panix3.panix.com>, comeau@comeaucomputing.com wrote:
>>A problem that I have with this is that to link to Language X can't
>>actually mean to link to Language X because often Language X doesn't
>>describe what linking to it actually means.
>
>Strictly speaking only if the language describes how it should be
>converted into binary code, at least in the linking part.

Which is why C++ doesn't strictly speak that. :)

>>  So it would seem
>>wrong for Standard C++ to do so.  I mean, how could it?
>>(I think you may actually say so above, but I didn't get it.)
>
>The standard (in 7.5) already speaks about "linking to a language".

Sure, but the implementations details are beyond the scope of
the standard, and rightly so IMO.

>It seems though that objects in a language have an interface which is used
>when linking together with other objects. So linking to another language
>would mean something like being compatible with that interface of the
>objects of that language. Then this interface is created via language
>constructs. So it seems that one should be able to create a definition of
>some sort expressing this compatibility condition on the language level
>(even though I am not sure what exactly this formulation should be).

But, for instance, C doesn't define what its full interface is,
so being able to say what it is from C++ doesn't follow.
Even if there are languages for where this could be done,
and I agree it could be done at least in part, it seems like
it would be at the wrong level for a number of reasons.
-- 
Greg Comeau                 Countdown to "export": December 1, 2001
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout

Tasty C99/C++ Combo: Dinkumware libs + Comeau Compilers == WOW!!!

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



