I disagree with many things that Damian Conway writes in his books. Learning Perl is important if you want to program in Perl.

That you have not seen the idiom frequently used may be due to you not encountering situations where having a subroutine if a lexical scope is necessary.

It may be due to your different exposure. Even though I only listed "recent" languages (Visual Basic dates from 1991), that is mostly because I remember the scoping rules for these quite well. I think the decision on whether support lexically scoped subroutines was made on a performance/implementation aspect. For lexically scoped subroutines, you need to do more housekeeping with the stack than on subroutines that do not allow such, at least for language implementations that allocate all variables on the stack. The "early" languages did that quite often, as the stack has hardware support while allocating from the heap is more expensive.

If you're bent on categorizing C as a "scripting language", feel free to do so, but it detracts from whatever point you might be trying to make otherwise.

As an aside, your run on sentences make your text hard to follow. You should try to take a step back and see whether your sentences are complete, contain matched sets of parentheses and whether the points you're trying to make are clear. I found many of your paragraphs very hard to follow and thus don't comment on them.


In reply to Re^7: Perl scoping not logical...? by Corion
in thread Perl scoping not logical...? by perl-diddler

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.