Why should you use Perl?

(...) Anyway, I hope Perl 6 will not be too complex. Now Perl has all its advantages, it's quite comprehensive. Make it too complex and the people will turn to other languages. Maybe we need even simplify Perl. But then it's losing its flexibility instead.

On the subject of compactness and simplicity vs. complexity: Scheme is, syntactically, insanely compact. (So is Common LISP, MacLISP, and all those other parenthesis-laden languages with lambdas and macros -- real macros, not silly preprocessor text-substitution crap -- and continuations and first-class functions and....) LISPen are comprehensive, flexible, terse, and sophisticated. Add true lazy evaluation to a LISP with real (not hygenic) macros and you probably have the most powerful programming language ever constructed. But everyone's afraid of them: why? My guess is, because they look weird to people trained in C-like languages. It's difficult to write Scheme that looks like C (or Java, or whatever), so moving to Scheme when all you know is procedural programming takes a lot of effort.

Perl 6 doesn't need to be simple (if it did, Larry could just slap a regex special form onto Scheme and call it a day) to be accepted by mainstream hackers: it needs to admit standard procedural programming. I don't know about the rest of the monks, but my first Perl programs looked very much like C (it took me about three months to realize that I could get more done with string interpolation and print than with stdlib-style printfs scattered around my code, and longer to learn how to use foreach-style loops instead of explicit indexing). When you want to get something done now, being able to fall back upon familiar habits is a virtue for the new language.

The bottom line, though, is that languages aren't what make programming hard (although a language that doesn't let you do what you want will make your job harder); programming is intrinsically hard. See also Choose the most powerful language.

--
F o x t r o t U n i f o r m
Found a typo in this node? /msg me
% man 3 strfry


In reply to Re: Seven good reasons for Perl by FoxtrotUniform
in thread Seven good reasons for Perl by Wassercrat

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.