=head1 TITLE

Keep default Perl free of constraints such as warnings and strict.

=head1 VERSION

  Maintainer: Daniel Chetlin <[EMAIL PROTECTED]>
  Date: 3 Aug 2000
  Version: 1
  Mailing List: [EMAIL PROTECTED]
  Number: 16

=head1 ABSTRACT

Perl5 is usable with no hassle as a quick-and-dirty problem-solver by default.
It is ideal for one-liners, short scripts, and quick hacks that have no need
for extra protection or error-checking. It is also great for large projects
by making use of the C<warnings> and C<strict> pragmas.

Perl6 should not make the one-liners, short scripts and hacks need to jump
through extra hoops to get the "lax" behaviour which is default in Perl5; the
point of using Perl as a quick-and-dirty tool is that you don't have to do
anything extra.

=head1 DESCRIPTION

Perl provides two main ways to ensure "safer", cleaner, more maintainable
code: the C<-w> switch/C<warnings> pragma and the C<strict> pragma. It appears
likely that Perl6 will improve upon, expand, or add to this area. Extra
functionality and power for these pragmas as well as additional pragmas (such
as the C<stricter> pragma mentioned at TPC) seem to be a good thing, but none
should become default for Perl.

In large projects which require the constraining pragmas, it is not an issue
to take the extra steps and 'use' them. But in quick solutions and one-liners,
it is a major drawback to have to add C<no strict> or C<-M-strict> for every
quick hack or one-liner that would violate the C<strict> pragma. Some have
suggested a shortcut command-line switch that would disable the constraining
pragmas, and others have suggested that one-liners be exempt from the default.
Both of these solutions would make things somewhat better, but it still does
not fit what seems to have been the philosophy of Perl from day 1: be _lax_ by
default, and allow constrictions to be added by hand.

Perl6 is intended to make the easy things easier and the hard things possible,
just like Perl5 only moreso. While making the constraining pragmas the default
might make hard things very slightly more possible, it would also make lots of
easy things harder, and that is something to avoid at all costs.

This RFC is particularly concerned with the idea of having C<strict 'vars'> on
by default. This is an attempt to get around Perl's design of having all
variables global by default, and lexical only when declared. It seems that a
much better solution would be to redefine Perl's default behaviour in the case
of undeclared variables, and cause those to be lexical. Making 
C<strict 'vars'> default appears to be an attempt to fix a hole in the floor
by permanently barring access to the room in which the hole is, rather than
just patching the hole.

=head1 IMPLEMENTATION

There should be no implementation issues.

=head1 REFERENCES

    perlrun(1), strict(3)

Reply via email to