PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: uncleunvoid on November 12, 2010, 09:19:31



Title: improvement? extern NSString * const instead of define
Post by: uncleunvoid on November 12, 2010, 09:19:31
I have been coming across quiet a few articles mentioning that the use of

:

// Prefs.h
extern NSString * const PREFS_MY_CONSTANT;

// Prefs.m
NSString * const PREFS_MY_CONSTANT = @"prefs_my_constant";


is quicker and more usable than using define to declare command static names...

thoughts?

http://stackoverflow.com/questions/538996/constants-in-objective-c (http://stackoverflow.com/questions/538996/constants-in-objective-c)