Quote:Original post by Riekistyx
So people who teach this methods are incorrect, wrong, and its never used eh?
I know a place that teachs it heavily and relies on it.
So let me ask you this. Are you in companies saying this to me? Or just some persons who dont prefer singletons.
I cant begin to see how its messy at all. Infact Hungrian notation is probably more ugly to look at than this. So you tell me...
I guess you are speaking about singletons here - I may be wrong.
This is true: people who teach you that you should use singletons instead of globals are plain wrong. Singletons have their roles, but it is uberdifficult to use them correctly - as a consequence, it is a good idea to not use them. Now, I may be wrong, but I believe that my own experience (I have been a software architect for years) is valuable.
Bad use of singleton == use of a disguised global.
Moreover, C++ don't allow you to create perfect singletons (the destruction problem is really annoying) although good enough implementation is generally OK.
You should read Washu's journal (see my sig) - he made 3 entries about singletonisis last year (surf his journal, you'll find them).
And Hungarian notation, when used correctly, is incredibly useful. See Joel on Software's essay about this.
Regards,