Re: In Praise of the new O'Reilly Cocoa book
Re: In Praise of the new O'Reilly Cocoa book
- Subject: Re: In Praise of the new O'Reilly Cocoa book
- From: Marco Scheurer <email@hidden>
- Date: Fri, 17 May 2002 13:16:06 +0200
On Wednesday, May 15, 2002, at 05:18 pm, Michael P. Rogers wrote:
At 4:29 PM +0200 15/5/02, Ondra Cada wrote:
Incidentally, any news at O'Reilly?
The Garfinkel & Mahoney book is out, and it is *great*. Lots of
examples and lucid explanations, signatures for the major methods,
copiously illustrated, well organized, just a delight. My only
complaint is that there's nothing on networking, but the book is 600
pages, so that may explain it. Maybe that can be part of an on-line
addendum. Anyone who's learning Cocoa on their own needs to work
through this book, and it would also be an excellent foundation for a
course.
I *don't* work for O'Reilly, I just happen to be a satisfied reader.
It's an OK port of an excellent NeXTSTEP programming book.
Note that there are some serious technical errors, especially in memory
management, throughout the book. For instance on page 123:
- (void) setStart:(id) anObject
{
[start release];
start = [anObject retain];
}
This is wrong, and has been discussed in length many times on this list.
A more correct approach (but there are other solutions) would be:
- (void) setStart:(id) anObject
{
[start autorelease];
start = [anObject retain];
}
This error appears in many places in the book, and can lead to serious
problems. On the same page:
- (void) dealloc
{
[start release];
[end release];
[super release];
}
is obviously wrong, but this is probably a typo, although on page 357,
one can also find:
- (void) dealloc
{
...
return [super dealloc];
}
I have also some doubts about the interest of the RTF class example. It
was nice 10 years ago (Nextstep Programming : Step One : Object-Oriented
Applications was published in 1992), but is not very relevant today to
the Cocoa programmer.
All in all, it looks to me like the book was rushed to publication and
would have needed a bit more work to be really great.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.