In my experience, people simply go "Doh, of course!" or don't write the wrong code in the first place. It has never caused me any real problems.
For those of you that may be curious, or not know C++, in C++ this:
Obj x();
is a declaration of a function called x that returns an Obj. Whereas this:
Obj x;
defines (possibly, depending on context) an instance of the type Obj called x.
Most people get over this pretty quickly.
If that is your main complaint about a language then the language doesn't have too many problems. Not that I'm suggesting that C++ doesn't have more serious problems.
In my experience, people simply go "Doh, of course!" or don't write the wrong code in the first place. It has never caused me any real problems.
For those of you that may be curious, or not know C++, in C++ this:
is a declaration of a function called x that returns an Obj. Whereas this: defines (possibly, depending on context) an instance of the type Obj called x.Most people get over this pretty quickly.
If that is your main complaint about a language then the language doesn't have too many problems. Not that I'm suggesting that C++ doesn't have more serious problems.