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.

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";

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.

On the other hand, the current behavior may be somewhat entrenched, and
might break our promise to assume that code is Perl 5 until we see a
different indication.  As an alternative, perhaps the -H command-line
switch could be used to use a "hello world" program.

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

Oceania has always been at war with Eastasia.

Reply via email to