> On the other some of the case statements I had to look at (and no, I did > not write them myself) are less easy to detect, even though they use proper > indent. > But if: > - a single block in the case, spans over 50 or more lines (multiply screen > pages) > - is already indented 4 or 5 levels at the start (so you can no longer tell > how many levels that are by just looking at it, could be 8 space, could be > 10) > - has several nested if, or other blocks within it. > > [ don't start arguing, that then the code should be rewritten, => to > rewrite the code one must read it first] > > then indent alone is almost useless to make out where a case-block starts. > All you have is a ":" at the end of the label. not that easy to spot. (and > if it's an else, all you have is a simcolon on the end of the previous line, > that's a guaranteed one to overlook) > > > wasn't pascal designed to make the good easy, and the less good less easy? thats one of the things i like about it. having the *option* to make awfull code more readable is good (required in some cases) - but it shouldn't make proper code less readable.
yes, you must read the code to rewrite it - but if a programmer wrote code that way for me, id have them stay back after 5pm and have it written properly. (ok, not practical on open source!) - V
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
