more useful options | |
PerlMonks |
Rex2: Interactive Perl vs. Shell Scriptby stefp (Vicar) |
on Jul 02, 2002 at 18:27 UTC ( [id://178946]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|