Notationally distinct is not terribly important.

You dont think so? I disagree. The notational difference reads different and thus has a different psychological impact on a maintainence programmer. But each to their own. TMTOWTDI.

For example, 3 and 4 differ only in terms of the variable used and whether the condition is placed before or after the block; they not only do exactly the same thing, they do it in exactly the same way.

Do tell. :-) Im afraid there is a problem however, as only one of them involves a block they dont do the same thing. And this is of course beside the above point.

For example, using a while loop with a counter at the end of it that is not used for anything else other than to count out the iterations of the loop is something you can do in any language that has while loops, because the for loop is conceptually a special case of the while loop.

Well I think your claim "all languages" is a little broad. And just becuase you can do this kind of equivelency in most languages doesnt mean the point is any less relevent.

Congratulations, you discovered a general principle that applies to all languages.

You think I am unaware that the vast majority of languages support this equivelency? Hell while we are at it why dont we lose all the non GOTO examples as conceptually GOTO maps closest to "JMP" and all of the above are ultimately implement via a CMP and conditional JMP.

I'd say that these extras (like map) are not "extra" per se but are part of what makes a rich language such as Perl rich.

Er. I dont see how they can not be "extras" while at the same time being part of what makes the language rich. My earlier argument was that it was exactly these extras that do make the language so rich.

but the higher-level features, where appropriate, are less work to use.

I think the choice of one of the solutions over the next is related to both how easy it is to write and to how closely it maps onto the semantic context of the problem at hand. But I already said that didn't I.

--- demerphq
my friends call me, usually because I'm late....


In reply to Re: Re: Re: Re: Self-improvement and TMTOWTDI by demerphq
in thread Self-improvement and TMTOWTDI by Tanalis

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.