Re: KVC and KVO for arrays
Re: KVC and KVO for arrays
- Subject: Re: KVC and KVO for arrays
- From: Stephen Hoffman <email@hidden>
- Date: Fri, 15 Feb 2008 10:18:22 -0500
- Organization: HoffmanLabs LLC
I'm not massively experienced in C, started in FORTRAN and came into
Objective-C this year, can anyone tell me how the two versions differ
and if adopting one over the other will have any effect on my code
later? Much of the Apple code I've seen use #define statements, but
I've seen the NSString elsewhere like in Hillegass's book.
Jon
It was once fairly common practice to use the C preprocessor (home of
the #define and friends) on Fortran source code, then run the results
through the Fortran compiler.
Seeing Fortran with C preprocessor and macro definitions embedded was
(at first) jarring, but it all works nicely.
I mention this to flag the internal sequencing here.
At its simplest, the preprocessor #define is for use by the programmer
on the program source code and for the program source code itself, and
prior to compilation, while NSString and C declarations are for run-time
and external and display use.
One wrinkle: various debuggers can't deal with and can't symbolize the C
preprocessor names, just the resulting substitutions. This again
because the pre-processing here takes place upstream from the
compilation, and its associated creation of the debug symbol tables.
_______________________________________________
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