one of the things i like most about cocoa is the readability factor. but... one of the things that annoys me most is the convention of convenience constructors to stutter.
what I mean is this:
[NSString stringWithString:s]
[NSNumber numberWithDouble:d]
[NSValue valueWithInt:i]
[NSDictionary dictionaryWithObjectsAndKeys:]
etc...
why doesn't the convention follow a less stutter/echo pattern and simply start convenience constructors with the word "with"? so then we would have:
[NSString withString:s]
[NSNumber withDouble:d]
[NSValue withInt:i]
[NSDictionary withObjectsAndKeys:]
etc...
it's a minor discussion point, but one I thought I would just throw out there and see if anyone with more clout than me can explain all the echos in my head ;-)
obviously, I'm not going to petition AAPL to re-write the appKit in favour of my suggestion, but are there any arguments against naming my own conv-constr's as such? (of course i can use whatever conventions i want in my own code (duh!) but i hate to swim upstream blindly). Roger, Roger?