27.3.3. C++ initialization types

OMG this is hell, understand when primitive variables are initialized or not:

Intuition:

Good rule:

  • initialize every single variable explicitly to prevent the risk of having uninitialized variables due to programmer error (which is easy to get wrong due to insane rules)

  • if you don’t define your own default constructor, always = delete it instead. This prevents the possibility that variables will be assigned twice due to zero initialization