design criticism

N

Nick Keighley

*Nick Keighley:

context is everything...

but in general, being prepared to make a fool of oneself often pays
off!

Just a misunderstanding.

The code presented uses "protected:" for functions that really should be
"private:".

ah, so I read what you wrote- just ignored the context in which it
was
written.

When protected is wise to use is still something I'm getting
to grips with. My current rules of thumb: make data private, make
"interface
methods" public non-virtual functions, make over-ridable
"implementation
methods" virtual protected functions.

As with all rules of thumb they get broken (I commonly have public
virtual
functions).

Cheers, & hth.,

yes, ta
 
M

mike3

* mike3:







Yes, it's known as "God" object (or class).

Such large classes are symptomatic of lack of design.

A class that has evolved to take on more and more responsibilities.

Eww. You mean like putting the whole darned program into one
giant, bloated object?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top