From -7791191993192617535
X-Google-Thread: f78e5,e8e0ab29e8861265
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!news.glorb.com!newshosting.com!nx02.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: caj@cs.york.ac.uk (chris jefferson)
Newsgroups: comp.std.c++
Subject: Re: If C++ had interfaces, what would they be?
Date: Tue, 26 Jul 2005 16:15:21 GMT
Organization: The University of York, UK
Lines: 56
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <42E60A63.9050409@cs.york.ac.uk>
References: <dfadnU0KIovHJkbfRVn-3Q@speakeasy.net>   <1121963458.661748.118300@f14g2000cwb.googlegroups.com>   <HIednX0HN9sLm33fRVn-qQ@speakeasy.net>   <1122299887.515239.317170@g49g2000cwa.googlegroups.com>   <oaidneYkiKMP93jfRVn-hQ@speakeasy.net> <1122336456.595882.282330@g49g2000cwa.googlegroups.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1122394530 9070 158.152.254.254 (26 Jul 2005 16:15:30 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Tue, 26 Jul 2005 16:15:30 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)
X-Accept-Language: en-us, en
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id j6QGFLxK007905;
	Wed, 27 Jul 2005 02:15:21 +1000 (EST)
X-NNTP-Posting-Date: 26 Jul 2005 10:03:16 GMT
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox4.ucsd.edu  (v1.6 Apr  6 2005 07:48:50, 0.0/5.0 3.0.0)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-York-MailScanner-From: news@york.ac.uk
X-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 47261 j6QA3IjX052957 mailbox4.ucsd.edu)
X-York-MailScanner: Found to be clean
Xref: g2news1.google.com comp.std.c++:1498

Bob Bell wrote:
> "Steven T. Hatton" wrote:
> 
>>kanze@gabi-soft.fr wrote:
>>
>>
>>>"Steven T. Hatton" wrote:
>>>
>>>>People can argue that there are mechanisms for locating such
>>>>definitions without a great deal of effort.  It may only take
>>>>a minute. Do that 60 times, and it takes an hour.  The
>>>>arrangement of different code bases makes this more difficult
>>>>than it would be if there were a formal mechanism for
>>>>organizing resources(as in Java).
>>>
>>>I don't know.  I've found it just as difficult to locate
>>>definitions in Java as in C++.  More difficult, in fact, because
>>>the definitions are always embedded in a mess of implementation
>>>details.
>>
>>With the exception of interfaces and abstract classes, Java doesn't have any
>>distinction between "declaration" and "definition" (that I can thing of.)
>>Of course these features are used extensively.  Nonetheless, because the
>>Java source code is more coherently organized by specification (or at least
>>recommendation and convention), and also because Java specifies a great
>>many infrastructure mechanism to facilitate locating resources, the Java
>>resource base can be searched much more effectively and deterministically
>>than can a C++ code base.
> 
> 
> As far as I can tell, this simply isn't true; at least, searching for
> definitions in a C++ code base does not have to be inefficient or
> non-deterministic. Modern IDEs accomplish this quite handily; the
> Metrowerks IDE can quickly take me to the definitions of macros,
> functions, classes, typedefs, etc.
> 
I would be very interested to know what would happen if you tried to
feed Metrowerks some evil C++, like say Boost's metatemplate programming
library :)

Also, while it's easy to find the "base definition" of a template, I can
imagine it would be hard if not impossible for an IDE to show you the
"correct" template overload for a particular situation.

I'm not saying C++ shouldn't support these things, but it makes it very
hard to write anything in an IDE which doesn't have to use heuristics to
some degree.

Chris

---
[ 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                       ]



