From 2833002754349475869
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ccbfcafab96cf493
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-11-27 10:47:01 PST
Path: archiver1.google.com!news1.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: apm35@student.open.ac.uk (apm)
Newsgroups: comp.std.c++
Subject: Re: Proposol to increase robustness of programs
Date: Tue, 27 Nov 2001 18:46:55 GMT
Organization: http://groups.google.com/
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <d1a33011.0111271036.23b5d75f@posting.google.com>
References: <3BFE97B3.91430FB1@wanadoo.fr> <3C006716.4070201@earthlink.net> <flr8qm6oj4.fsf@riz.cmla.ens-cachan.fr> <3C025715.9050709@earthlink.net>
X-Trace: mail2news.demon.co.uk 1006886819 mail2news:29000 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)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Date: 27 Nov 2001 18:36:16 GMT
Lines: 43
Xref: archiver1.google.com comp.std.c++:8321

Edward Diener <eldiener@earthlink.net> wrote in message news:<3C025715.9050709@earthlink.net>...
> My personal view of C++ is that the spirit of the language is that the 
> programmer is in charge and should know how to do things within the 
> language syntax. 

Indeed. This is a good legacy from C which takes the point of view
that the programmer is always right.

> Adding language syntax to make it easier to use the 
> language effectively is one thing but adding language syntax to prevent 
> a programmer making an error seems to me to be wrong.

There are languages that do this. Eiffel springs to mind. IMO C++ is
ok as it is but would have benefitted from an optional facility for
DbC. Too late now but it can be simulated. The GNU project NANA is an
attempt to provide DbC to C. There is a product called iContract that
provides DbC to java. AFAIK there is no DbC product for C++ yet.

> Many C++ programmers seem to feel that there is no need to document 
> classes and class hierarchies effectively but that the language itself 
> should become self-documenting. I take the opposite view that adequate 
> documentation for classes is needed, outside of source code, and that it 
> is not the responsibility of the language to become more complicated 
> merely so that it becomes self-documenting.
> 
I also believe in separate documentation but at a higher level. For
people that want very low level documentation I think that something
that produces it from the source code it ideal because it avoids the
problem of the code and the documentation getting out of step. Javadoc
is very nice. In C++ there is a package called doxygen that provides a
similar facility. It draws inheritance diagrams and indicates where
functions are acquired via inheritance etc.

Regards,

Andrew M.

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



