It is a matter of style...

time to read 1 min | 113 words

Today I freaked out two co-workers by looking at their code and saying (respectively) "How long have you worked with C?" and "You didn't get a lot of time with C++, right?"

The pieces of code in question were: (for the C comment)

Customer customer = null
for(int i=0;i<array.Length;i++)
	customer = new Customer();
	//do stuff

And: (for the not a lot of time in C++ comment)

int totalCarCount;
if( IsValid )
	totalCarCount = GetValidTotalCars();
	totalCarCount = GetInvalidTotalCars();

int totalWheelCount;
DoComplexWheelCalculation( out totalWheelCount);

And yes, the examples here are fake, and both are good developers, and I just said what came to mind first :-)