--- Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote:
> I had a thought tonight.
> 
> Perl has a general principle that, in the absence of any indication
> otherwise, it should use a sensible default.  This default generally
> matches the most common use of the feature by new programmers.  This
> principle is reflected in Perl 6's design in many ways--$_, sort's
> default behavior, the @_ list, etc.
> 
> I think that Perl 6 should apply that to the entire program.  If the
> whole program consists of an empty string, it should substitute in a
> sensible default program.

This makes perfect sense.

> I have done extensive research on the Internet and printed Perl
> books, and have concluded that the single most common Perl program 
> is the following:
> 
>      print "Hello world!\n";

In P6, that would be:

    say "Hello, world!";

> Therefore, I recommend that, when given an empty program or -e
> string, Perl 6 should print "Hello world!", emit a newline, and
> exit.  I believe that this feature would be fairly trivial to 
> implement.

I cannot agree with this.

In fact, if someone types "perl" on the command line without any
arguments, it seems obvious to me that they are intending to begin
development of a script.

As such, I think that we should refocus the parrot team's priority.
Instead of wasting valuable coding time winning the Parrathon, it would
be better to provide a functional elisp compiler targeted at the parrot
VM. This way, a naked invocation of "perl" would bring up a script
development system (emacs, ported to parrot: pmacs?) for further work.

Since the emacs codebase is already ported to many platforms, it should
be trivial to add this to the core perl distribution. Perhaps Simon
would agree to lead this effort?

> Brent "Dax" Royal-Gordon <[EMAIL PROTECTED]>
> Perl and Parrot hacker

Cheers,

=Austin

Reply via email to