5 ms·
Yes, something to replace the super crufty NSArray / NSMutableArray / NSSet / NSDictionary, syntax would be really good. Small talk message passing was meant t
by elai 17y ago
Yes, something to replace the super crufty NSArray / NSMutableArray / NSSet / NSDictionary, syntax would be really good. Small talk message passing was meant to have short, small one symbol binary operators, but unfortunately that elegance is not there in objective c.
- glhaynes 17y agoOver the life of the code, I'm only gonna type it once; I may read it a hundred times.
- elai 17y agoTo be honest with you [[stuff objectAtIndex:5] objectForKey:@"name"] is less readable than stuff[5][@"name"]. And you type this kind of code constantly over and over again, it can really stack up and create something that would be simple to read in other languages.
- cpr 17y agoExcept that if you're used to Smalltalk, this is just standard fare. I agree that a Python-like shorthand would be great at the object level, but then you'd have a mixture of shorthand and longhand, and that would be ugly.