Re: Dictionaries or custom class containing no methods?
Re: Dictionaries or custom class containing no methods?
- Subject: Re: Dictionaries or custom class containing no methods?
- From: Quincey Morris <email@hidden>
- Date: Tue, 17 Jun 2014 15:46:38 -0700
On Jun 17, 2014, at 15:21 , Trygve Inda <email@hidden> wrote:
> Thoughts on the pros and cons of both methods?
I strongly agree with Lee Ann that the custom class is a better approach. It almost always happens that you (eventually) want to associate behavior with the properties. There can also be issues trying to use bindings and KVO on values stored in a dictionary, when the relationship between the values and the UI gets more complex. I always find myself rewriting quickie dictionaries as classes, and swearing not to take the shortcut next time.
_______________________________________________
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