Re: drawRect not getting called problem solved
Re: drawRect not getting called problem solved
- Subject: Re: drawRect not getting called problem solved
- From: Graham Cox <email@hidden>
- Date: Fri, 29 Jul 2011 10:57:23 +1000
On 29/07/2011, at 10:31 AM, Tom Jeffries wrote:
> I do think
> it's important to keep in mind the difference between code and data,
> and some of the suggestions I got seemed to show some lack of clarity
> in that area. Confusing the two may work in certain specific
> environments, but it reflects a misunderstanding of the way computers
> actually work. I think it's important to have an awareness of the
> difference.
I'm not quite sure what you're referring to with this comment - looking back over the replies in the (former) thread about this doesn't make it very clear.
But if you are referring to object-oriented programming in general, where objects are code + data combined, you are swimming upstream there. All OOP "environments", languages really, start here - it's easier to program if code and data are combined and not kept separate. This is reflected in the fact that no major new language written post-early 80s uses a procedural approach rather than an object-oriented one. It doesn't matter how computers "really" work, what's important is having a usable abstraction that a programmer can use to be productive, and so far, OOP is proving to be immensely successful by that criterion. But, computers "really" don't work by separating code and data anyway - the whole Von-Neumann architecture that is just about every computer ever built was a breakthrough precisely because it stopped treating code and data as two different kinds of things and lumped them all together.
If your comment is more to do with the division of labour between different objects within your design, then sure, it's possible to go ahead and make a real mess if you aren't methodical. But Cocoa in particular is very conscientious when it comes to reinforcing the 'Model-View-Controller' (MVC) stratum, and every Cocoa developer is wise to follow its example.
--Graham
_______________________________________________
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