Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: improvement? extern NSString * const instead of define  (Read 4660 times)
uncleunvoid
Full Member
***
Posts: 27


View Profile Email
« 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
Logged
Pages: [1]
Print