Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you are worried about wasting time with not being able to compile due to unused variables, chances are you're doing something wrong like creating long functions.

I have been working with Go for five years, and the fact that I'm forced to use all variables I define means I write simpler code. The only instance that I find I waste time is when I want to access a variable that I otherwise don't need to quickly print it when debugging something. Still, this is usually a minor issue and it's a great tradeoff. I wish more languages enforced such rule.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: