First of all, I ended up in PERL because I took a job that deals with PERL, and in the current market slump, any job that pays is better than no job at all. I have grown to enjoy PERL, but it is not, and I don't expect it to ever be, my favorite language {ducks the hurled mugs}.

Second, I don't see how maintaining a naked block is any more difficult than a labeled block. This might be due to my relatively short 8 years as a programmer, but it seems to me the psuedocode comments should pretty well fall into place when writing the loop. In a multi-leveled if structure I am in the habit of labeling most of my close brackets so those who are using editors that do not support matching bracket searches have less trouble debugging. So adding a beginning comment in place of a loop condition and then a comment at the end does not seem like a massive undertaking in my eyes. To some it may, and I guess this entire thread should not interest you and you can continue with your day.

Third, you said you know what's going on without even thinking. I believe this is the problem with the whole sub-thread we are looking at here. This is no longer about PERL and it's not really even about programming at the root level. Many people will tell you the best way to improve is to make your own mistakes, and that forces you to have a fundamental understanding of the error. When I was in pre-veterinarian classes, my first chemistry class and my first biology class had us doing the most basic experiments possible. This was to help us to learn why the priciples existed, so we did not blindly memorize the work of others and have no real knowledge to make improvements of our own. Now I have been working with DBI for a while now, and many of the old scripts I come accross use ORAPERL. I change them to use the new way. I do not leave them because it used to be the vastly accepted way of doing it. If people did not question the ways things were done, there would be no USA, and I would probably be sitting in one of the English provinces banging away in COBOL and FORTRAN. I approve of all those who question the "accepted" ways, because this shows a person who has not rolled over and died. I refuse to crush the budding creativityof a programmer becuase I might not like the fact he used needless keystrokes to comment a naked block that seemed like a good way to go. I won't even argue that it is the best thing to do, but I will {obviously} defend their right to find out why it is or is not. Besides, your shop standards may be wildly different than mine, so that's why I suggested the monk who asked this question take it to their manager and group who will be maintaining this code. If they see it as good and not confusing then who are we to tell them different.

Now, not to be stupid or to point out the obvious, but considering the author of this debated loop, and his long list of credentials, and his deep understanding of and link to the language itself, I cannot for the life of me figure out why this is even a matter of dispute.

Lord Wrath

In reply to Re: Re: Re: Re: Re: do/redo or for(;;): what's Kosher? by Lord Wrath
in thread do/redo or for(;;): what's Kosher? by rje

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.