Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Public vs Private (vs Protected)

Name: Anonymous 2011-05-19 20:39

Alright /prog/, do you prefer to default your class' members to public or private and why?

class dude : person {
public:
  int var1, var2;
};


or

class dude : person {
  int var1, var2;
};

Name: Anonymous 2011-05-19 20:46

>>3

Yes, public, private and protected all have their own uses. However, the question remains what one should use as a default for good practice when any in particular would work just as well.

Also, I've used Ruby. It's pure OOP and doesn't have the shit syntax of smalltalk.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List