[Newbies] Accessors for everything?

2009-01-06 Thread Ryan Zerby
I'm going through the laser game example presented on this list a short time ago. I notice that he creates accessors for everything. Can someone explain the reasoning for that? I can understand having a wrapper for those functions for which you want external access. However, doesn't it

Re: [Newbies] Accessors for everything?

2009-01-06 Thread David Mitchell
I've seen both. I try to avoid creating accessors and only add them as I need. I try to create methods based on the responsibilities of the object and not around its data structure. But, I've worked on projects where every object had accessors for every variable (often necessitated by the

Re: [Newbies] Accessors for everything?

2009-01-06 Thread Claus Kick
David Mitchell wrote: I've seen both. I try to avoid creating accessors and only add them as I need. I try to create methods based on the responsibilities of the object and not around its data structure. But, I've worked on projects where every object had accessors for every variable (often