Book missing from python line-up?
Gordon McMillan
gmcm at hypernet.com
Thu May 25 09:04:21 EDT 2000
Nick Bower <N.Bower at ses.curtin.edu.au> wrote:
>
>I colleague the other day, who was familiar with various procedural
>languages said:
>
>"I want to learn OOP. Can you recommend a book (and
language)?"
>... Java however has a selection now, and it seems that if you
>want to really learn more than just basic concepts in OOP then
Java is
>the language to go with.
>If one of Python's goals is to be a good teaching language,
shouldn't
>there be a book about OOP using Python, rather than the current
books on
>Python with only chapters on OOP?
Because Java is statically typed (with a rather old-fashioned
type system), learning OOP in Java means learning a whole lot of
rules, and their implications. While I've never bothered to look at
the Java books in question, my guess is that you'd be very lucky to
find anything about how to "think OOP". It's going to be all about
the rules of inheritance, interfaces, access specifiers, blah blah blah.
The rules for Python are short and sweet. It's dynamically bound, so
there's no need to create an inheritance hierarchy (or separate
interface) so a B can substitute for an A. In fact, people who come
to Python from Java or C++ often have trouble seeing how simple
it can be.
For me, the "Aha!" about thinking OOP came from reading Design
Patterns (Gamma et al, Addison Wesley). I'd been stuggling with a
similar problem - the C++ books at the time all focussed on the
mechanics with contrived examples that did nothing to create a
deeper understanding.
While I heartily recommend the book, I'm can't really recommend
it for this purpose. I was ready for the "Aha!", and Design Patterns
just happened to trigger it. OTOH, I have no other
recommendations.
My own realization was that you create objects so you can say "You
take care of it".
- Gordon
More information about the Python-list
mailing list