2 ms·
No, both lines are equally readable. A number of operations, placement of operators, names are all the same. The only difference is replacing "," with "]+", whi
by klibertp 11y ago
No, both lines are equally readable. A number of operations, placement of operators, names are all the same. The only difference is replacing "," with "]+", which is not any different for your eye* to read.
What you mistake for readability is familiarity: after you read a word you need to associate a meaning with it. It takes longer to interpret the meaning of things you didn't see before while grabbing a meaning from a cache is nearly instantaneous. You understood this difference in comprehension speed as a readability difference.
My main point is that it makes no sense to talk about readability without first getting used to the grammar and vocabulary of a language. In this case, it's unfamiliar feature in an otherwise normal environment, but it gets worse. There are people who believe they can judge the readability of entirely alien (to them) languages and it hurts those languages reputation pretty badly. Lisps are the prime example of this.