heinsaar / BolzmANN

Neural Network
0 stars 15 forks source link

Initialize all local scalar variables. #34

Closed heinsaar closed 7 years ago

heinsaar commented 8 years ago

Even those with known valid default values.

heinsaar commented 8 years ago

In general, an initialized local variable, even if it's a variable with well-defined default value (like an object of std::string) says two things: (1) That the author of the code did not just forget to initialize the variable. (2) That it's okay for the variable to have the value it's been assigned.