The tag has no wiki summary.

learn more… | top users | synonyms (1)

7
votes
6answers
3k views

Is it called class or object instance?

I have a wording / precision question. Sometimes I write "object instance" sometimes "class instance". Isn't it that an object is always an instance of a class? Therefore "object instance" is not the ...
2
votes
3answers
340 views

Want to know performance issues of Class types & access modifiers

Someone suggested me to mark classes as SEALED that are not being inherited anywhere. I was using default style and was not concerned with the type of class. At present I don't have a benchmark tool ...
0
votes
2answers
241 views

Name for this pattern?

I'm writing a class that will handle thread synchronisation. It would have a begin method which would increment a counter and an end method that would de-increment a counter. It'll have another ...
56
votes
5answers
30k views

When do you use a struct instead of a class?

What are your rules of thumb for when to use structs vs. classes? I'm thinking of the C# definition of those terms but if your language has similar concepts I'd like to hear your opinion as well. I ...
4
votes
2answers
886 views

Smart Pointers inside class vs Normal Pointers with Destructor

Regarding pointers which are members of classes. Should they be of a smart pointer type or is it enough to simply deal with them in the destructor of the class they are contained in?
3
votes
2answers
2k views

Should I use a Class or Dictionary to Store Form Values

I am working on a C# .NET Application, where I have a Form with lots of controls. I need to perform computations depending on the values of the controls. Therefore, I need to pass the Form values to a ...
11
votes
4answers
836 views

Nested Classes: A useful tool or an encapsulation violation?

So I'm still on the fence as to whether or not I should be using these or not. I feel its an extreme violation of encapsulation, however I find that I am able to achieve some degree of encapsulation ...