[LC++]Is there a place for public data members?
Keith
kschin at unf.edu
Tue Nov 6 01:56:02 UTC 2001
Every simple class has the chance to get complicated. I have found this
out when I wrote a 'simple' cd player class. I knew much better when I
wrote object classes for a ray tracing class.
If the class/program is something you are going to write/use/throw away
then simple is good. If it is something you are going to maintain, use
the 'proper' way to save you a headache in the future.
Keith
Mark Phillips wrote:
>But are there cases where it is overkill? Should I only take the
>latter approach for more complicated kinds of classes, or is it
>wise to _always_ take the latter approach? If the former approach
>is sometimes appropriate, is there any rule-of-thumb for determining
>which approach to use in a given situation?
>
More information about the tuxCPProgramming
mailing list