This thread is mainly for us programmers to talk about the various things we don't like about Objective-C and/or Swift. The nice thing about Swift is that Apple seems to have taken a page or two from the scripting playbook.
OK, on with the griping:
First, what's wrong with using a + sign for concatenation? Can't the compiler be trained to treat
as
(Note: Swift does use the + operator for concatenation)
Second, what's so great about pointers? In C++, the only thing you use them for is to create a new variable that is different only in name from an old variable; if x=2 and p=x, and p is a pointer, and we have access to both variables, and p's value is untouched after the part where p is set to x, then we can choose to get either one's value.
OK, on with the griping:
First, what's wrong with using a + sign for concatenation? Can't the compiler be trained to treat
Code:
NSString *string1 = string2 + string3
Code:
NSString *string = [string2 stringByAppendingString:string3
Second, what's so great about pointers? In C++, the only thing you use them for is to create a new variable that is different only in name from an old variable; if x=2 and p=x, and p is a pointer, and we have access to both variables, and p's value is untouched after the part where p is set to x, then we can choose to get either one's value.