Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Stuff that annoys you...

Name: Anonymous 2010-09-03 12:45

when reading code not written by yourself. For example, I cannot stand it when  people use

if (condition)
    ...
else if (condition)
    ...
else if (condition)
    ...
else if (condition)
    ...
else


instead of the much more readable


if (condition)
    ...
else
    if (condition)
        ...
    else
        if (condition)
            ...
        else
            if (condition)
                ...
            else

Name: Anonymous 2010-09-03 13:16

>>1
I prefer (1) where respectable alternatives do not exist or are not as useful.  (2) produces tree-like code if you nest if else statements in each other and that could affect how the code is displayed by your text editor or IDE (heaven help you if you use an IDE).  The "else if" conditional structure is an established feature in most languages.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List