3 ms·
It's not the language that's verbose, it's the Cocoa libraries. Instead of this: NSString *s2 = [s1 stringByAddingPercentEscapesUsingEncoding:NSUTF8Encoding
by GeneralMaximus 17y ago
It's not the language that's verbose, it's the Cocoa libraries.
Instead of this:
NSString *s2 = [s1 stringByAddingPercentEscapesUsingEncoding:NSUTF8Encoding];
You could easily have:
NSString *s2 = [s1 percentEscapes:UTF8];
(I like the first way better, though. It reads like an English sentence, and you know exactly what the arguments are.)
EDIT: formatting.
- theli0nheart 17y agoGood point, but Objective J seems to have borrowed that as well. i.e. [CPApp sendEvent:[CPEvent mouseEventWithType:CPLeftMouseDown location:[theWindow convertBridgeToBase:CGPointMake(x, y)] or [CPApp setTarget:self selector:@selector(disposeOfEvent:) forNextEventMatchingMask:CPLeftMouseUpMask untilDate:nil inMode:nil dequeue:YES]; It's not that I don't applaud the creation of Objective-J, because I do. I think it's a big step towards the next generation of in-browser applications. To the 280 guys: I'm not trying to insult you or your hard work, and I'm sorry if it came off like that. All I'm saying is that you're going to have a harder time making this a new web standard because of this design fact. It certainly won't deter me, but it will definitely deter others.