Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
True, the switching back and forth between english and code takes a gear shift. So in order to have a happy medium, why not make the comment
#while(1) psuedo-loop
} #end psuedo-loop
Seems logical. Therefore, you have the readability and the code is not actually re-evaluating the condition.

I am currently working in a place where it is common and acceptable for everyone to use their own style if formatting. For example, I make my if like this:
  indented code block
mostly due to my 2 year job as faculty assistant and grader for my college
#begin sub-rant
{as a matter of fact I stopped helping people debug errors in lab if it was not formatted in a similar way since it's so hard to read it}, but I never once criticised a neat way of doing something because it made me think or look at it a second time. I learned many tricks from the students I was supposed to be helping to teach.
#end sub-rant

yet many of the people I work with use the format
if (condition) {
unindented code block
and many other variations. It's something I just learn to shift my brain around. I absolutley can't stand to look at these j-builder style formats, but I hafta. So the argument if you don't hafta do something different don't, doesn't hold much with me.

Besides, the thought of leaving in un-needed processor instructions {for whatever reason, be it not knowing what it is, or just to make my code pretty} starts to remind me of a well documented taboo that is talked about a lot here. I agree that comments are often ignored and so on, but there is a risk we take when trying to standardize a new way of solving things. I'm sure the first case statement was met with people crying how different is was and why don't we just use a lot of if's. Sure, it can be done that way, but maybe the labeled block, or commented block is the right way to have an infinite loop. I mean really, while(1) is probably the most misleading way of doing it, because when is 1 ever != 1, and yet programs all over the globe end in a timely manner. So I say it's all personal choice.

Lord Wrath

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

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (4)
    As of 2018-06-19 01:56 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (111 votes). Check out past polls.