|
|
|
|
|
by upinsmoke
5066 days ago
|
|
This uses SubjectiveScript.m by same author: https://github.com/kmalakoff/SubjectiveScript.m A, N are typedefs of existing types. "While JavaScript allows flexibility in variable types, Objective-C requires explicit variable types. To try to keep it brief, I tried to condense types down to the shortest name possible: typedef BOOL B;
typedef NSInteger I;
typedef NSUInteger UI;
typedef float F;
typedef double D;
typedef id KV[2]; // key-value pair #define NSO NSObject
#define A NSMutableArray
#define NSA NSArray
#define O NSMutableDictionary
#define NSD NSDictionary
#define S NSMutableString
#define NSS NSString
#define Date NSDate
#define N NSNumber
#define E NSException" Just read that want me to stay far away from this. |
|
I'm also surprised that O stands for NSMutableDictionary but NSD for NSDictionary. What is an "O"?
Another thing I would argue is that using the shorter #defines for mutables would encourage their use. Instead, it might be prudent to encourage use of the immutables.