Daniel Chetlin <[EMAIL PROTECTED]>: > Yep, I agree. I had a short conversation with MJD about this, and he > made some great points. I don't want to paste it here without his > permission, but I'm hoping he's listening. Although I do know he's > going to Las Vegas, so he may not have time to chime in. OK, here's what I said to Dan: First, it's silly to talk about 'strict' as if it were one thing. It's not. It's three things that have nothing to do with each other. They should be considered separately. For example. 'strict refs' forbids the use of strings as references. Since Larry said on 18 July that probably typeglobs will be going away, and since that implies a total revamp of Perl's symbol table and name lookup semantics, it's impossible to say today whether 'strict refs' is even going to have any meaning in Perl 6. It's not a reasonable topic for discussion because the feature it's meant to disable may very well not exist in Perl 6, or may be altered in an orthogonal direction so that 'strict refs' is nonsensical. But that hasn't seemed to stop anyone from shouting 'use strict good! no strict bad!' The discussion so far has been disappointing in its lack of cogency. The failure to discuss the three 'strict' pragmas separately is a good example of this. The title of the RFC itself perpetuates this thoughtlessness and I think it disables the discussion. Second, although I have no opinion at present about the desirability of 'strict refs' or 'strict subs', I think it's a perfectly awful idea to perpetuate 'strict vars' into Perl 6 at all, and certainly not as the default. In Perl 5, variables are global by default and require an explicit declaration if they are to be lexical. Everyone recognizes that this was a design error, so they say 'Always use "strict vars"' which helps programmers evade the fallout from the design error. Fine. Now we are trying to say that it should be the default to avoid the fallout. Duh! Just fix the design error and there will be nothing to avoid! The right solution is to make variables lexical by default, and require an explicit declarations of global variables. We are not exactly on shaky ground here. Here are the names of some languages you may have heard of that follow this strategy: C C++ Common Lisp Java If lexical variables are the default, then 'strict vars' will be totally unnecessary because it will be impossible to forget the 'my'. This will be cleaner and safer and more convenient and simpler than requiring 'use strict' *and* requiring 'my' declarations everywhere *and* requiring that the programmer get a fatal error if they forget to put in all 12,393 declarations.
Re: C as default (was Re: RFC 16 (v1))
mjd-perl-list-language-strict Sat, 05 Aug 2000 08:46:00 -0700
- Re: RFC 16 (v1) Keep default Perl free of co... Peter Scott
- C<strict> as default (was Re: RFC... Daniel Chetlin
- Re: C<strict> as default (was... J. David Blackstone
- Re: C<strict> as default (was... mjd-perl-list-language-strict
- Re: C<strict> as default ... Nathan Wiger
- Re: C<strict> as defa... mjd-perl-list-lang-strict
- Re: C<strict> as... Nathan Wiger
- Re: C<strict>... mjd-perl-list-language-strict
- Re: C<strict> as... Nathan Wiger
- Clarification on Defau... Nathan Wiger
- Re: Clarification ... Mark-Jason Dominus
- Re: Clarificat... Peter Scott
- Re: Clarification ... mjd-perl-list-language-strict
- Re: Clarificat... Ted Ashton