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

It's a bit more complicated than "X is easier to read than Y".

When we read text, we don't read letters, we read words. So familiar word shapes help reading text more quickly. Lowercase letters have more distinct shapes (due to ascenders and descenders) so they make for more distinct word shapes. Uppercase word shapes are not only less familiar (because most text you've read is not all-caps) but also less distinct because they lack descenders and all have roughly the same height.

So in other words, writing keywords as in SQL in uppercase can be more readable because a) it indicates it's that language (which can be helpful in mixed-language source code), b) the keywords usually being written in uppercase make them easier to recognize without having to be familiar with the words from other contexts (this might actually be an advantage for people who don't read as much English text) and c) this sets keywords apart from variable and attribute names without syntax highlighting.

For filenames and such there is no such advantage which is why you only occasionally see all-caps used for special files (e.g. LOCK, VERSION, README) where the uppercase text is intended to stand out from other file names and usually follows a naming convention that makes the word shape common enough to be easy to recognize.




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

Search: