Am 19.07.2012 22:43, schrieb Jacob Carlborg:
On 2012-07-19 16:50, Alex Rønne Petersen wrote:
I suspect that you have a C++ background. If this is not accurate,
ignore the rest. But if it is accurate, my plea to you is: Learn other
languages. C++ has next to no innovative language features (even C++11's
take on lambdas is an abomination) and encourages defensive programming
to the point where it's ridiculous (I mean, no default initialization of
variables? In 2012?).
In C++ it's even better (irony). It depends on what kind of variable is
declared. I.e. a global variable, a local, instance or a class variable
(static). Some of these are default initialized, some are not. I have no
idea which are initialized and which are not.
That is why any C or C++ project should have static analysis tools
integrated in the continuous integration build system, plus compiling
all warnings as errors.
--
Paulo