Re: language books don't get outdated
From: Jerry Coffin (jcoffin_at_taeus.com)
Date: 08/25/04
- Next message: K Campbell: "Re: n00bie questions"
- Previous message: Rolf Magnus: "Re: Cpp source code"
- In reply to: Carter Smith: "language books don't get outdated"
- Next in thread: Carter Smith: "That's all syntax"
- Reply: Carter Smith: "That's all syntax"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Aug 2004 08:03:36 -0700
"Carter Smith" <news@email.icarusindie.com> wrote in message news:<0zWWc.23594$L94.10276@fed1read07>...
> "old" programming books are no more outdated than last year's dictionary or
> last years algebra text book.
This simply isn't true.
Many older books on C++ had all sorts of problems relative to the
language as it stands today. For a few obvious examples:
1) assuming that new returns a null pointer upon failure.
2) making no attempt at exception safety.
3) advocating inheritance when templates would be more appropriate.
4) advocating classes that imitate superior ones in the library.
The bottom line is pretty simple: even among new books, there's a
distressingly small percentage that teach the language is it exists
today. As the books get older, that percentage diminishes very
quickly.
> Especially with C++ which had been
> standardized before many newbies had been born. A book that teaches how to
> use classes and other core OO topics or even just how to use the basics of
> the language will never go out of date.
C++ has not been standardized for a particularly long time, and books
as a whole have lagged well behind the standard. There ARE excellent
books on things like OO analysis (E.g. Booch) algorithms (going back
at least as far as Knuth) and so on, but when it comes to the language
proper, few older books retain a great deal of value.
> C++ has added new ways to do the same old same old and there's no harm in
> doing the same old same old the same old way. Because it still works.
Quite the contrary. Just for one obvious example, the minute exception
handling was added to the language, MANY of the old ways of doing
things were instantly broken. Teaching people to write code that isn't
exception safe is actively harmful.
[ ... ]
> Should we ignore that core theory of geometry simply because it's thousands
> of years old and new theories related to geometry have come about?
Of course not -- but the simile is poor at best. In the case of
geometry, the definition of what's being taught is old. In the case of
C++, the definition of the language has NOT existed for thousands of
even dozens of years. Worse, most books did not (even attempt to)
follow the standard as soon as it was approved.
There are two basic problems here. First of all, many new books aren't
entirely new -- they're revisions of older books. Unfortunately for
that, C++ has changed enough, quickly enough, that most of revisions
aren't really adequate to address the changes that have taken place.
In many cases it appears that _several_ revisions will be necessary
before the books catch up with the current standard.
Second, especially in introductory books, the author faces a serious
problem at best: the market forces him to teach the language as
defined by mainstream compilers rather than as defined by the
standard. Until recently, and to a lesser degree even now, that meant
many books were taught C++ within the restrictions imposed by MS
Visual C++ 6.0 (which predates the standard).
Even after the author and publisher agree that an up-to-date book is
needed, it can easily take a year of serious work to write a good
book, and months after that to get it published.
> You
> can't get much more outdated than 2000 years and yet here we are still
> teaching it and relying on it.
This assumes that being dated depends purely on age, which clearly
isn't true.
Some parts of geometry haven't change radically since then, but
medical practices, knowledge of chemistry, physics, etc. certainly
have. If, however, you want to restrict yourself to what the Greeks
knew about computer programming (i.e. nothing) feel free to do so --
but don't expect everybody else to share your enthusiasm for
ignornace.
> The STL and templates are not without controversy. It's not like everyone
> just assumes they're the best thing ever. If you want to learn how to use
> that stuff with "up to date" books then that's fine. There are entire books
> dedicated the the STL and templates. For my audience I go with the basic
> OOP style. If you're an advanced programmer and insist on templates and
> whatnot then that's your choice. But it's not my target audience.
Templates, for one example, are nearly unavoidable except by the very
most advanced programmers. Just for an obvious example, the minute you
write a hello world program that writes to cout, you've used a
templated class. That class is defined in such a way that it can throw
exceptions.
The fact is, that in C++ you can't avoid templates and exceptions and
so on. If you ignore them, you write broken code. If you teach others
to ignore them, you teach them to write broken code.
--
Later,
Jerry.
The universe is a figment of its own imagination.
- Next message: K Campbell: "Re: n00bie questions"
- Previous message: Rolf Magnus: "Re: Cpp source code"
- In reply to: Carter Smith: "language books don't get outdated"
- Next in thread: Carter Smith: "That's all syntax"
- Reply: Carter Smith: "That's all syntax"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|