There are currently two problems that preclude perl to take off as an interactive shell. The grammar and the scoped eval.

The current grammar of Perl5 makes perl as interactive shell irrealistic. An interactive shell uses a lot of string literals that must be quoted in Perl which is very impractical. That problem will be solved by the ability to dynamically tailor the perl6 syntax. There is no doubt that a syntax for interactive use will emerge: redirection and pipe will be expressed more shortly than comparaison and bitwise or. We call that "Huffman coding". Currently attempts (filter, preprocessor...) to build an interactive shell from perl can only be hacks.

The second problem is the current behavior is the amnesic eval which against granular interaction that is the basis of interactivity. Indeed each line must be evaluated but the amnesic eval force the user to type unacceptable long lines. I explained te problem in RFC 351: Beyond the amnesic eval but the grammatical hack I proposed does not fit in Perl6 syntax.

Anyway, if I read correctly the apocalypse and exegesis. try { } will be the Perl6 equivalent of the Perl5  eval {  }. I hope that the string eval eval "" which is not braced will be unscoped in Perl6. This seems consistent with the general principles stated for Perl6 syntax

These 2 problems solved, I see no raison that Perl6 won't eventually become the prevalent interactive shell.

-- stefp -- check out TeXmacs wiki


In reply to Rex2: Interactive Perl vs. Shell Script by stefp
in thread Perl vs. Shell Script by ellem

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.