Linked by MOS6510 on Wed 17th Apr 2013 21:20 UTC
General Development "You often hear about how important it is to write 'readable code'. Developers have pretty strong opinions about what makes code more readable. The more senior the developer, the stronger the opinion. But, have you ever stopped to think about what really makes code readable?"
Permalink for comment 558957
To read all comments associated with this story, please click here.
Not sure I agree
by Neolander on Wed 17th Apr 2013 21:55 UTC
Neolander
Member since:
2010-03-08

When a programming language becomes very, very complex, like C++, what happens is that each person will use it in a different way, and no one will manage to fit the whole feature set in his mind. To follow his comparison to human languages, we end up with a dialect-like situation: people speak multiple variants of a single language, yet end up having a hard time to understand each other.

My conclusion is that languages should have a feature set that is large enough to provide good expressivity, but not so large as to cause the emergence of such code dialects. It's arguably a fragile balance, and may be a subjective one: if you ask me, the Go programming language is quite balanced on this front, but I've recently had quite a long argument with someone around here, moondevil I think, who argued that this language went way too far in the name of simplicity.

By the way, I'm not surprised to see the opinion that many features are best coming from someone who likes C++ and C#. Both languages have gone pretty far down the path of adding every feature under the sun for the sake of expressiveness and programmer freedom. In C#, there even is a language keyword, yield, which to the best of my knowledge only serves the purpose of implementing iterators in a slightly more elegant way.

Edited 2013-04-17 22:14 UTC

Reply Score: 6