On 7 Apr 2009, at 5:52 pm, Russel Winder wrote:

On Mon, 2009-04-06 at 12:32 +0100, Enda Dunican wrote:
Yes I agree with this last email. If there was an ideal language out
there everybody would be using it.  Be prepared to be browbeaten from
the soapbox when you start a topic like this.

Or it could have been an excellent exchange of people's experiences with
an interesting pool of ideas created.

It is a pity this email stifled that.

Perhaps we can resurrect it.

I take it we can all agree that

 - the standard library that comes with C++ is bigger than the
   standard library that comes with C (necessarily so, since
   C++ 98 includes everything that C89 does and then some,
   while C++ 0x will include everything that C99 does and then some).

 - the standard library that comes with Java is bigger than the
   standard library that comes with C++ (empirically so, since
   even C++ 0x does not include a graphics library or sockets) but
   it's less clear when you consider the "standard environment" that
   C++ usually lives in (UNIX or something much bigger), but even
   then, most of that stuff is available some other way.

The dubious bit is how much this helps, or rather, what it helps
*for*.  RMIT in Melbourne switched from Ada95 to Java because
AWT was in all the Java books and writing flashy GUI apps was
sexy and could be counted on to drag the students in, while
writing highly reliable code -- Ada's strength -- wasn't and
couldn't.

What this does is to trade the difficulty of _writing_ stuff for
the difficulty of _finding_ stuff in the library and wrapping
glue code around it.

In fact, useful GUI stuff can be done quite simply in C by using
a small library that turns your program into a localhost web server
serving up HTML.  (I've been given such a library, which comes to
13 printed pages all up.  It's multiplatform, of course.)

But that raises another question:

 - what kind of stuff do we really _want_ students doing in a first
   programming paper?  What is it _good_ for them to do?

Another question of interest is the size of the reference manual.

The C99 standard is about 600 pages.
The C++0x standard is over 1300 pages.
I don't have a figure for Java off the top of my head,
but it came to two thick bound books, so it's not small.

Another factor has less to do with the language than with
the compiler:  the quality of the error messages.  I well
recall a friend who was an undergraduate when I was.  She
has a PhD in statistics, so is no dummy.  She had trouble
learning to program, and claimed that it was because the
compiler error messages made no sense to her.

Now C++ templates are fearful and wonderful things.  You
can do really amazing stuff with them.  But if you are not
an expert, a simple typing mistake in using a string
method can give you half a screen of error message.  (Come
to that, C++ strings can be a total performance disaster,
as one of my students this year found to his cost.)

I suggest that it's worth trying some "typical" student programs,
if you can find them, randomly mutating them, and seeing what
kind of error messages you get.

an expert that
The

Reply via email to