OO patterns with Python

Just just at xs4all.nl
Wed Feb 19 19:07:16 CET 2003


In article <3E52AAA2.77BDA0E3 at astro.cornell.edu>,
 Tom Loredo <loredo at astro.cornell.edu> wrote:

> It's not quite what you asked for, yet still I think it might be
> worth taking a peek at Apple's *Objective C Programming Language* book:
> 
> http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/ObjC.pdf
> 
> I don't know objective C, and my brief perusal of this book doesn't
> exactly encourage me to learn it.  But the introductory chapter on
> the "philosophy" behind the OO approach is one of the best things
> I've read on this topic.  Some of the terminology doesn't quite carry
> over into Python, but it's a good read nevertheless.

I haven't read this book, but the Cocoa frameworks are a great source of 
inspiration for OO design. Objective-C is pretty lame compared to 
Python, but it's a very nice hybrid from a C perspective; it has dynamic 
method dispatching and a nice object model. Objective-C's and Cocoa's 
philosophy are fairly "pythonic", eg. containment is often preferred 
over inheritance. ObjC is very easy to pick up if you know C and Python, 
which I found is not true of C++ (although I must admit I wasn't really 
motivated to try very hard, erm, at all actually). But then again, I 
only learned a bit of ObjC to help out with the PyObjC project, which 
allows me to use Cocoa from Python.

Just




More information about the Python-list mailing list