On Fri, Nov 25, 2011 at 01:01:19AM +0400, Vladimir Uryvaev wrote:

> Though accessors it widely used way, they're not self worth feature.

Especially when they're simply getter/setter. But at least compiler
should be smart enough to inline then. Also slotted object model simply
don't have the concept of access protection (and IMHO they generally
work better).

> Accessors are useful when:
> - Class should re-render (cache, graphic or whatever) on its attribute change.
> - Notifications about changes should be sent to another object.
> - Other attributes should change coherently.
> - I forget.

- (forgot item) Internal representation is subject to change (i.e. array
  vs list vs something else)

> 
> There are two data storage 'paradigms':
> - true object having designed interface with all its internals hidden,
> - plain old data type with free access.
> In most cases it is good to head toward one of them. Accessors are seem to be 
> emulation of POD in true object.

C++ and message passing languages are toward the first. Generics
oriented languages (CLOS and functionals) are toward the second (simply
because objects haven't member functions :D)

-- 
Lorenzo Marcantonio
Logos Srl

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to