Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
May 29, 2017, 08:40:49 PM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.
Pages: [1]
Print
Author Topic: improvement? extern NSString * const instead of define  (Read 4186 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: