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

> Wouldn't you jump to is_enabled to see what it does?

That depends on a lot of things. But the answer is (usually) no. I might do it if I think the error is specifically in that section of code. But especially if you want to provide any kind of documentation or history on why that code is the way it is, it's easier to abstract that away into the function.

Furthermore, most of the time code is being read isn't the first time, and I emphatically don't want to reread some visual noise every time I am looking at a larger piece of code.



That makes sense. To mee it's not about the function having bad code, but different opinions about what exactly "enabled" means.

If I'm not interested I just jump past the block when reading (given that it's short and tidy)




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

Search: