3 ms·
However, I'd be concerned that the person with strong understanding of things will simply leave uninitialized static variables lying around in the code simply b
by jamornh 13y ago
However, I'd be concerned that the person with strong understanding of things will simply leave uninitialized static variables lying around in the code simply because they _knew_ it was always initialized to 0. It might work if your entire coding team has that innate understanding, but that is unlikely.
Sometimes I think that having deep and expert understanding of a language may cause you to create code that other team members cannot understand... not on purpose, but due to your assumption that these are common knowledge (whether they should be or not isn't the issue.)
- mansr 13y agoStatic initialisers are a horrible example of "deep" knowledge. Not knowing how they work reveals not only ignorance of syntax but a fundamental lack of understanding of the entire programming and execution environment. Failure to understand your environment inevitably leads to confusion and bad decisions.
- lttlrck 13y agoI disagree that static initialization is deep understanding nor is it innate.
- Jare 13y agoA more common example is operator precedence, especially booleans. The precedence rules are easy and set in stone for decades, but always use parentheses to clarify, and I do not trust programmers that don't.
- thepicard 13y agoAgain, I think one with deep understanding would know that leaving it unset would result in zero, but also know that initializing it declares intent of the original author, and is thus useful.