← Back to team overview

kicad-developers team mailing list archive

Re: Concerns about clearing disagreements?before committing.


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

Follow ups