Andre Poenitz <[EMAIL PROTECTED]> writes:
| If you desperately need to protect against abuse of your classes, you need
| "private". On the other hand, the most likely "abuser" are yourself, so
| you pay (writing accessor functions, compile times, probably run time) for
| something you might not _really_ need.
with accessors you can eaily change from a cached value to a generated
one... this is impossible if you alway access the variable directly.
| I usually consider "protected" member vars good enough for most practical
| reasons, especially if they are used only within the class's hierararchy
| (i.e. don't have public accessors).
|
| I don't really like constructs like
|
| count( count() + 1);
|
| and _much_ prefer
|
| ++count_;
then I am going to claim that the responsibility for the count
variables is wrongly placed, and _that_ is why you end up with the
ugly code.
--
Lgb
- Re: Undo II - The (hopefully) working patch Juergen Vigna
- Re: Undo II - The (hopefully) working pa... Lars Gullik Bj�nnes
- Re: Undo II - The (hopefully) workin... Juergen Vigna
- Re: Undo II - The (hopefully) wo... Lars Gullik Bj�nnes
- Re: Undo II - The (hopefully) working patch Lars Gullik Bj�nnes
- Re: Undo II - The (hopefully) working patch Juergen Vigna
- Re: Undo II - The (hopefully) working pa... Lars Gullik Bj�nnes
- Re: Undo II - The (hopefully) workin... Juergen Vigna
- Re: Undo II - The (hopefully) wo... Lars Gullik Bj�nnes
- Re: Undo II - The (hopefull... Andre Poenitz
- Re: Undo II - The (hope... Lars Gullik Bj�nnes
- Re: Undo II - The (hope... Andre Poenitz
- Re: Undo II - The (hope... Asger K. Alstrup Nielsen
- Re: Undo II - The (hope... Andre Poenitz
- Re: Undo II - The (hope... Lars Gullik Bj�nnes
- Re: Undo II - The (hope... Andre Poenitz
- Re: Undo II - The (hope... Lars Gullik Bj�nnes
- Re: Undo II - The (hope... Lars Gullik Bj�nnes
- Re: Undo II - The (hopefully) working patch Lars Gullik Bj�nnes
- Re: Undo II - The (hopefully) working patch Jean-Marc Lasgouttes
- Re: Undo II - The (hopefully) working pa... Lars Gullik Bj�nnes
