Hacker News new | comments | show | ask | jobs | submit login

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.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact