foreach_reverse is better than ever

Jonathan M Davis jmdavisProg at gmail.com
Mon Feb 15 05:59:43 PST 2010


Jacob Carlborg wrote:
> 
> I never understood the reason for that the names need to be short. I
> think the most important thing is that the names are clear. Just look at
> the C standard library, it's horrible, almost every name is an
> abbreviation of some kind.

Clarity is very important, but if you have long names which are used 
frequently, it can quickly result in long lines of code which end up on 
multiple lines and can be hard to read. If a word isn't used very often, 
then it's not that big a deal, but the more often it's used - especially 
when it can be used multiple times on the same line - the worse it gets. 
Really, the ideal situation is to find words which are short and clear, but 
a balance must be struck between the two regardless. Too long and it's 
cumbersome. Too short and it's likely to be unclear.

There's no question that programmers often use words for variable names and 
such which are ludicrously short and unclear, but long words can be a 
problem too.

- Jonathan M Davis



More information about the Digitalmars-d mailing list