3 ms·
Swift supports default and objc doesn’t. This makes calls smaller. Swift also has argument hiding with the underscore before the parameter. Swift also ask varia
by jbluepolarbear 5y ago
Swift supports default and objc doesn’t. This makes calls smaller. Swift also has argument hiding with the underscore before the parameter. Swift also ask variable arguments. Hiding named parameters and variable arguments make calls much smaller. My point stands.
- Apocryphon 5y agoThat's not really "much" longer. And in some cases the brevity saved could really increase obfuscation and confusion.
- jbluepolarbear 5y agoYes it is; especially, if there’s long parameter names. And I disagree with the obfuscation and confusion, but that’s a discussion on Swifts goal of self documentation not code length.
- stefanfisk 5y agoyou can define ObjC method parameters with empty selector names if you want. This for example is perfectly legal ObjC, callable as [foo gimmeAString:10 :"hey "]. - (NSString*)gimmeAString:(NSUInteger)count :(NSString*)piece { return [@"" stringByPaddingToLength:count withString:piece startingAtIndex:0]; }