| www.delorie.com/gnu/docs/libobjects/libobjects_9.html | search |
![]() Buy GNU books! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Objective-C is not Smalltalk. Differences that matter to the Collection heirarchy:
I make the Collection method names a little more descriptive, while keeping them close to Smalltalk. (For instance I think there is a good reason for using "-addObject:" instead of "-add:")
We could create two parallel heirarchies, one for Objects and one for elements passed as void*, but since so much of the functionality overlaps, I have merged them, and it doesn't actually look all that bad.
Passing pointers to functions is a reasonable substitute. This is made easier with gcc's nested functions and the LAMBDA() macro defined in coll/collstd.h.
I think it should be made obvious which methods allocate a new object. Hence "-shallowCopyAs:[Bag class]" instead of "as:[Bag class]".
<<This section unfinished.>>
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |