The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
7 views

Obj-C - Instantiating Class without [classname init] [migrated]

I am reading Kochan's book Programming in Objective-C Sixth Edition when a strange piece of code confused me. In the book, I am trying to replicate the Calculator class, and have reached the code for ...
-6
votes
1answer
126 views

Does one really need multiple instances of a class? [closed]

Generally I'm extremely skeptical of anyone who criticizes the singleton design pattern in software. In the MVC (model-view-controller) design pattern, views and controllers are usually singletons and ...
2
votes
2answers
139 views

observer class as instance

Sometimes I read in oberver-pattern descriptions, to make the constructor of a observer base class protected so the class will be abstract. but by making the constructor public (if even one is ...
4
votes
4answers
838 views

Make methods that do not depend on instance fields, static?

Recently I started programming in Groovy for a integration testing framework, for a Java project. I use Intellij IDEA with Groovy plug-in and I am surprised to see as a warning for all the methods ...
1
vote
3answers
243 views

Why are inheritance and interfaces restricted to instance members?

Disclaimer: I think the rules are almost the same in most OO languages, but since I'm most familiar with C# I'll be relating to this specific language. I think that the use of attributes and ...