Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
July 28, 2017, 11:55:35 AM
Home Help Search Login Register
News: Please DM @puremvc on Twitter to gain forum access. Spambots are why we can't have nice things.
Pages: [1]
Print
Author Topic: improvement? extern NSString * const instead of define  (Read 4280 times)
uncleunvoid
Full Member
***
Posts: 27


View Profile Email
« on: November 12, 2010, 09:19:31 AM »

I have been coming across quiet a few articles mentioning that the use of

Code:

// 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
Jump to: