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

Because I dislike interspersing executable statements at module level with function definitions. I’d rather have all code live inside functions and have one main entry point for the script. It’s just a personal preference, nothing wrong with not doing that though.



But you could have a single main() call without the if statement, couldn't you?




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

Search: