Created
April 9, 2010 16:42
-
-
Save richcollins/361355 to your computer and use it in GitHub Desktop.
Objective-C vs. Io
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
//Objective-C | |
#import <Foundation/Foundation.h> | |
@interface Settings : NSObject { | |
NSString *email; | |
NSString *password; | |
NSString *server; | |
BOOL pushesMentions; | |
BOOL pushesBroadcasts; | |
int pushStartHour; | |
int pushStopHour; | |
} | |
@property (nonatomic, retain) NSString *email; | |
@property (nonatomic, retain) NSString *password; | |
@property (nonatomic, retain) NSString *server; | |
@property (nonatomic) BOOL pushesMentions; | |
@property (nonatomic) BOOL pushesBroadcasts; | |
@property (nonatomic) int pushStartHour; | |
@property (nonatomic) int pushStopHour; | |
@end | |
#import "Settings.h" | |
@implementation Settings | |
@synthesize email; | |
@synthesize password; | |
@synthesize server; | |
@synthesize pushesMentions; | |
@synthesize pushesBroadcasts; | |
@synthesize pushStartHour; | |
@synthesize pushStopHour; | |
- (void)dealloc | |
{ | |
self.email = nil; | |
self.password = nil; | |
self.server = nil; | |
[super dealloc]; | |
} | |
@end | |
//Io | |
Settings := Object clone do( | |
"email password server pushesMentions pushesBroadcasts pushStartHour pushStopHour" split foreach(n, newSlot(n)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment