11 ms·
It seems you like some ancient language which can't even concatenate a string without writing this dull statement with bunch of symbols. NSString *string1 =
by mekster 5y ago
It seems you like some ancient language which can't even concatenate a string without writing this dull statement with bunch of symbols.
NSString *string1 = @"Some";
NSString *string2 = @" string";
NSString \*string3 = [string1 stringByAppendingString:string2];
Not to mention it didn't have ARC back in the days.
For sake it was built nearly 40 years ago. Not sure if there's any room to question why Apple and devs wanted a new language.
I was amazed why anyone would want to use this language before Swift but people didn't have a choice.
There were efforts like MacRuby.
- lenkite 5y agoARC has been there for almost a decade now. Also if you wish to do heavy string concatenation, please use a NSMutableString and you can simply do: [string1 appendString:string2]; It is amazing that people forget to simply use the right tool for the right job and blame the PL instead.
- Apocryphon 5y agoTo be fair, while Swift includes nice convenience methods for strings, the new API comes with a considerable cost: https://www.mikeash.com/pyblog/friday-qa-2015-11-06-why-is-swifts-string-api-so-hard.html https://www.mikeash.com/pyblog/friday-qa-2015-11-06-why-is-s...
- Grustaf 5y agoThat article is from 2015. A lot has changed, though some people still complain.
- Apocryphon 5y agoDoubtful that the technical underpinnings of the API have changed all that much since 2015.
- saagarjha 5y agoThey very much have.