Skip to content

Instantly share code, notes, and snippets.

@hborders hborders/ExampleFoo.h
Last active Mar 13, 2017

What would you like to do?
An Objective-C pattern for making sum types - ExampleFoo.h
#import "Example.h" //
@interface ExampleFoo : Example
@property (nonatomic, readonly) NSString * _Nonnull f;
@property (nonatomic, readonly) NSString * _Nonnull g;
+ (instancetype _Nonnull)new NS_UNAVAILABLE;
- (instancetype _Nonnull)init NS_UNAVAILABLE;
- (instancetype _Nonnull)initWithF:(NSString * _Nonnull)f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.