• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Implementation across several files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementation across several files


  • Subject: Re: Implementation across several files
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 20 Apr 2006 22:28:50 +0200

Cem,

On 20.4.2006, at 13:17, Cem Karan wrote:

(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 :))

Were you thinking about KVC and KVO for this? I can see how they may be helpful under the right circumstances...

Yup, exactly.

Very roughly (!) I suppose the compiler could translate each ivar access to something similar to CD's primitiveValueForKey: (lower level rather, but the basic principle would be the same).

The evident argument is it would be inefficient, but given a vast number of ivars is accessed through KVO anyway, the difference in some 95 % of applications should be negligible; for the remaining 5- odd per cent there could be some low-level trick analogical to IMPs (i.e., to get the ivar address once and access it through a pointer).

The advantages would be, in my opinion, *vast*: the possibility to hide ivars from interface, no fragility at all when subclassing, you would be immediately able to create categories with ivars, and more...
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ 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
References: 
 >Re: Implementation across several files (From: Cem Karan <email@hidden>)

  • Prev by Date: Re: Highlighting a valid drop target (serious dead end)
  • Next by Date: Re: Trouble with outlined text
  • Previous by thread: Re: Implementation across several files
  • Next by thread: Calling UNIX commands from Cocoa?
  • Index(es):
    • Date
    • Thread