4 ms·
Doing so encourages you to have mutable data. If instead, a variable is assigned to only when it is defined, you're moving (in a small way) towards functional
by VikingCoder 14y ago
Doing so encourages you to have mutable data.
If instead, a variable is assigned to only when it is defined, you're moving (in a small way) towards functional programming.
Also, I often use scope just control the lifetime of a resource. These look like meaningless braces in the middle of a function to the uninitiated. It's RAII.