Re: KVC and KVO for arrays
Re: KVC and KVO for arrays
- Subject: Re: KVC and KVO for arrays
- From: Nick Toumpelis <email@hidden>
- Date: Fri, 15 Feb 2008 14:20:52 +0200
On 15 Φεβ 2008, at 12:27 ΜΜ, John Dann wrote:
I don't know what you mean by "effect" on your code.
Ok, sorry, I mean could this come back and bite me if I need to
refactor my code in some way? I was wondering if there was a subtle
difference in the way #defines and external variables operate that
could
cause headaches
I can't think of any reason why any of these should cause a problem.
#define (in this case) is a preprocessing directive for a symbolic
constant; this is processed before the remaining source code and
cannot
change.
<snip>
I don't think that it is a very good idea to use external variables
(especially in object-oriented programming).
I think you've answered it here though, do you think its worse to use
externals as I could unintentionally reassign them during execution?
Exactly. That could be a problem, depending on how big your program is
and whether there are inadvertent changes introduced in it. I was also
referring to the problem of ending up with data connections to various
places, that will not all be apparent when your program becomes
sizable. It is also a bad practice in terms of object-orientation as
your objects are best when they are fully encapsulated.
Nick
_______________________________________________
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