This is probably one for @zedshaw:
In C and C++ variables of built in type are default initialized to zero in the top-level scope, but to undefined in lower-level/function scope. What’s the reason for this? Is it to avoid the overhead of zeroing memory that’s likely to be overwritten soon with each call? That would be like trading safety for elegance?
I can’t quite make sense of such a design decision and I’m curious what those people who are undoubtedly much smarter than me might have thought here.