Re: Implementation across several files
Re: Implementation across several files
- Subject: Re: Implementation across several files
- From: Jonathon Mah <email@hidden>
- Date: Thu, 20 Apr 2006 22:43:46 +0930
On 2006-04-20, at 06:39, Ondra Cada wrote:
Also, the extra instance variables can be stored in a dictionary:
the overhead tends to be negligible (not always, of course, but
suprisingly often).
(Matter of fact, I would advocate to change the runtime to base
*all* instances on a dictionary /more precisely, a special
hashtable/, which would vastly improve the flexibility, allow for
much better interface/implementation separation, and also remove
the one fragility ObjC has, but that is definitely beside the point
at this moment :))
Yes, let's move instance variable declarations out of the header
while we're at it. Headers should contain what other users need to
know about a class, and no more!
Ondra, you have given me an idea: Could you get the effect of this
with some neat coding? Instance variable names are available in the
compiled app -- for example, class-dump shows them, and KVC uses them
IIRC -- so you could write a macro or something to do dynamic lookup.
Then use an extra dictionary to hold extra ivars not declared at
compile-time.
I'll have a play.
Jonathon Mah
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden