I think the reason many scripting languages lack declarations is the same reason Perl lacked them until version 5. These languages have tended to evolve, rather than being designed by a committee before the first line of code was written. Perl has evolved a form of safety, and also appears to be the only scripting language that has sensible and consistent variable scoping rules. Python hasn't got that, but it has evolved other cool stuff, like generators and comprehensions -- I often wish Perl had a simple equivalent. PHP... okay, I can't think of anything nice to say about PHP.

(And please, people, stop slandering static typing by associating it with explicit, verbose typing. Perl hackers should all be aware enough of Pugs to have heard of Haskell, and that means we should all know that it's possible for static typing to be as concise and expressive as Perl. Java isn't, but Java is mediocre by design; it's aimed at companies that want to hire a horde of replaceable cogs, instead of a handful of smart hackers working in a language that provides real expressive power but takes more skill to use.)


In reply to Re: The value of declarations by Porculus
in thread The value of declarations by tilly

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.