On Wed, Jan 28, 2009 at 10:56 AM, Jonathan Kimmitt <jonathan.kimm...@csr.com> wrote: > The next time I use == instead of eq to compare two strings, I > will know to expect it will always > evaluate to true. What other language does this (apart from C, > which would invariably return false)
Objective C (which is almost C, but different enough), == is used to compare if two objects are equal. And by equal, we mean "pointers to the same address space". As a result, classes like NSString override == and 'isEqual' to actually do things like string comparisons. So you can use == on string objects just fine :-)