Created
November 8, 2014 10:27
-
-
Save ealeksandrov/f748c9299e10271768ce to your computer and use it in GitHub Desktop.
Objective-C Minimalism
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env objc-run | |
@import Foundation; | |
@implementation Hello : NSObject | |
- (void) sayHelloTo:name | |
{ | |
printf("Hello %s, my address is %p\n", [name UTF8String], self); | |
} | |
@end | |
int main () | |
{ | |
id hello = [Hello new]; | |
[hello sayHelloTo:@"sunshine"]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment