Hacker News new | past | comments | ask | show | jobs | submit login

You can argue if it's useful or not on its own, but it makes sense when you consider that Swift is compatible with Objective-C. In Objective-C, that function would be a method like

    -(void) greetWith:(NSString *)greeting to:(NSString *)personName
and you'd call it like

    [self greetWith:@"Hello" to:@"Bob"]
Swift's external/internal parameters are built to allow the same style as was used with Objective-C and easy bridging. Swift's APIs tend to be terser than Objective-C ones, though.



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: