At 2:33 PM -0500 10/5/1999, Alex Ferguson wrote:
>... I'm unaware of any way in which C++ syntax is 'more natural',
>other than in the sense of 'for a C++ programmer', or 'cleaner' -- at all.
Having taught both C++ and Haskell for several years (each) to many
hundreds of undergraduate students from all over the world, I endorse that
sentiment enthusiastically.
One of the more clear-eyed (IMHO) and successful authors of C++ texts is
Cay Horstmann. A feature of his text, "Mastering C++" (Wiley, 1991), which
I like is the section, appearing at the end of each chapter, entitled
"Pitfalls" (the idea comes from Andrew Koenig's book, "C Traps and
Pitfalls"). Some of the pitfalls describe ordinary programming mistakes,
but the majority are "gotchas" caused by shortcomings in C++'s design of
(many of them faithful copies of mistakes in C). Horstmann gives a very
entertaining lecture on the topic of C++ pitfalls; a full hour does not
suffice to mention them all.
With time and patience, one can learn to think in C++, and it's quite
possible to write beautiful and efficient code in it (I'm a bit partial to
some of my own efforts). I believe, however, that one cannot fully
appreciate a programming language's strengths amnd weaknesses until one has
tried teaching it to a variety of students. Having done that, I'm here to
attest that Haskell's syntax --to say nothing of its semantics-- is much
cleaner, much simpler, and much easier to learn.
--HR
------------------------------------------------------------------
Hamilton Richards Jr. Department of Computer Sciences
Senior Lecturer Mail Code C0500
512-471-9525 The University of Texas at Austin
SHC 434 Austin, Texas 78712-1188
[EMAIL PROTECTED]
------------------------------------------------------------------