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

I disagree. Reading the verbose example takes less time to understand, not just because the concept is clearer, but it is also visually easier to separate lines, even if that is 10 times as long as yours. If you see that somewhere, it will take a blink of an eye to understand, but your one line solution has to be read from left to right carefully considering colons and separating parts in your head.

But there are other benefits. You need to make a compromise and there is no win-win situation. It is true that the 10 lines version is totally obvious for everyone, but I do not agree it will make easier to understand a complex piece of code. If I fill my screen with a function that makes a simple comparison, I will need an IDE and at least a couple of monitors for a function that actually makes something, I will not be able to understand the code because I will be too busy navigating it.

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