5 ms·
less verbose, really? People are giving Java crap for having to do string1.equals(string2) instead of string1 == string2, but what about [string isEqualToString
by zyb09 16y ago
less verbose, really? People are giving Java crap for having to do string1.equals(string2) instead of string1 == string2, but what about [string isEqualToString:string2]. Also concating strings in Objective-C makes my eyes bleed. I still like the dynamic aspects of the language (selectors etc.) though.
- swannodette 16y ago[string1 isEqual:string2] works just fine. String concatenation is no harder than a format string. Writing a category on NSArray to add join is pretty dead simple as well.
- fierarul 16y agoYou should see some of my generics code... Of course in Objective-C I would use casting so, indeed, it might be more verbose overall.
- alextgordon 16y agoYou're talking about Cocoa, not Objective-C. It's best to separate them, since some people love Cocoa but hate Objective-C and vice versa.