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

I think you've mistaken my argument. I didn't say that the Python version looks good or is the best way to do it. It's not.

I was saying that "something that is long and full of moving parts" is easier to read than something that is short and idiomatic. I am not saying either of them represent the ideal way to do it.

My definition of readability includes the ability to convey the programmer's intention to the mind of the reader. The reader should be able to work out what is intended by the code with minimal requirements placed on them, and I think I detailed earlier why I think the Python code does a better job than simple surrounding a shell command with backticks.



The reader should be able to work out what is intended by the code with minimal requirements placed on them....

That's where the argument goes wrong, if the idea of "minimal requirements" means "avoid idioms".


Well, I'd welcome an explanation of your opinion here.


Unless I'm writing training material for novices, I write code with the assumption that anyone else maintaining it is reasonably competent with the languages, libraries, and tools in question. That to me is a minimal requirement.




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

Search: