const correctness
const correctness
- Subject: const correctness
- From: Luther Baker <email@hidden>
- Date: Sun, 18 Mar 2012 00:12:36 -0500
Just curious for the reasoning as to why some of the API calls like
[NSDictionary valueForKey:] take an NSString* and not a *const* NSString* ?
I guess NSStrings are immutable and maybe most runtime built strings are
more commonly not const ... but is everyone simply casting these guys at
API invocation or is there a way around this I am missing.
The code just starts to get messy so I find myself removing the 'const' in
my definitions ... but in the spirit of self-describing OO, I sure prefer
to keep them const.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden