From -2169596727237038504
X-Google-Thread: f78e5,e8e0ab29e8861265
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII
Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 21 Jul 2005 14:30:17 -0500
Return-Path: <devnull@stump.algebra.com>
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)
Delivered-To: std-c++@ucar.edu
From: kanze@gabi-soft.fr
Newsgroups: comp.std.c++
Subject: Re: If C++ had interfaces, what would they be?
Organization: http://groups.google.com
Message-ID: <1121963458.661748.118300@f14g2000cwb.googlegroups.com>
References: <dfadnU0KIovHJkbfRVn-3Q@speakeasy.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Complaints-To: groups-abuse@google.com
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: f14g2000cwb.googlegroups.com; posting-host=62.160.54.162;
   posting-account=qsfl8gwAAABZGaLp2a7FeTfDkJamzWYW
X-Virus-Scanned: amavisd-new at ucar.edu
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by mailman.ucar.edu id j6LGVwNC019302
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Date: Thu, 21 Jul 2005 14:20:44 CST
Lines: 51
NNTP-Posting-Host: 65.182.171.162
X-Trace: sv3-KVstcOgs+dNAOK2r3cN+1HHRxL0pZHPmvz90KRiSyqWN9jpnr39t1InyyiGNXQyKzpScqwd0Tr3iTFt!3cJUwJhBh/ZsV3q8cQUYpOxKTRQlkKpZTxhM0F6LkqM3rAcXswo6OFBSYEnG/ottpJxrV0Vyj1sl!ICMTXszz56ETcdoNpRHGbt14uNLI6XRM1clM2vcj6u8=
X-Complaints-To: abuse@speakeasy.net
X-DMCA-Complaints-To: abuse@speakeasy.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32
Xref: g2news1.google.com comp.std.c++:1445

Steven T. Hatton wrote:

    [...]
> I'm wondering if there would be any advantage in attempting to
> formalize the notion of an interface as it relates to the
> #include directive.  I'm thinking that something along the
> lines of the OMG's IDL might serve as a starting point in
> designing such a feature.

I think that part of the problem you perceive is purely
pragmatic.  Ideally, we'd all like to put the "interface", and
only the interface, in the header, and everything else in the
implementation files.  From the very beginning, however, C++ has
struck a pragmatic compromize -- there are very practical
reasons why class definitions must contain the specification of
the private members, even though they aren't part of the
"interface".  Similarly, "export" has a long and complex
history, due to conflicting requirements from those trying to
implement templates in a robust manner, and those trying to use
them without ending up with too many dependancies.  (The fact
that there were idiots like myself who continually opened their
big mouth when they didn't know what they were talking about
didn't help much either.)

> I acknowledge that it might also serve as an example of why
> such a feature should *not* be introduced into C++.  One thing
> that is not clear to me is /what/, exactly, the term
> "interface" should mean in C++.  Is there any potential
> practical advantage to introducing a formal language construct
> called an "interface"?  What would that construct consist of?

Personnally, I would oppose any proposal which used the key word
interface, simply because the Java (mis-)implementation of it
has caused too much confusion around it.  Other than that, I do
think that C++ would benefit by a cleaner concept of modules,
what is exported, what not, etc.  But it isn't quite obvious
what.

--
James Kanze                                           GABI Software
Conseils en informatique orient�e objet/
                   Beratung in objektorientierter Datenverarbeitung
9 place S�mard, 78210 St.-Cyr-l'�cole, France, +33 (0)1 30 23 00 34


---
[ 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.jamesd.demon.co.uk/csc/faq.html                       ]



