• Hugo Kornelis (7/13/2010)


    I hope the author will stop by and tell us what he/she was trying to teach us with this question. Maybe I missed the deeper issue here.

    I guess the deep issue here is that code-reading/checking is an important part of many jobs; most of us tend to skim read and not notice errors, so it's as well to be reminded now and again tha reading is important. I'm pretty lazy about this for my own code and it would be a crime if I fed my stuff into execution without getting the parser to do a syntax check first, but I have had to evaluate other people's code too so the occassional reminder that I should look more carefully is a good thing, because there is always the risk that if one is skimming so that syntax errors are missed maybe some errors of logic will be missed too because one is not reading carefully enough.

    Incidentally, I was unpleasantly surprised by the introduction of mandatory semicolons into what should be a nice clean syntax that can be parsed unambiguously without these markers. I wonder whether something has been added to the language that genuinely prevents detection of some statement boundaries without specific separators (that would be a pretty stupid thing to do, but I've seen stupider things happen) or was some parser development team just too lazy to do it right; and I'm sad to see that MS is planning to make unneeded separators mandatory at some point in the future.

    Tom