~/.plan

rafael on 2003-12-03T13:07:02

Here's my partial TODO list for perl 5.10.

  • Introduce a new special code block, let's call it START, that acts a bit like CHECK : i.e. it's run at the end of compilation -- but at the end of the compilation of the current compilation unit, not at the end of the compilation of the main program.
  • Fix using tied hashes in scalar context. (This is currently forbidden in perl 5.9.0.)
  • Allow the syntax my($_) so it creates a brand new lexical variable $_. (local($_) doesn't create a new lexical variable, since it only lexicalises the value, but doesn't remove the magic from the previous $_.)
  • Make the peephole optimizer optional. Disable the peephole optimizer, run the perl test suite, fix the interpreter so that the tests still pass.
  • Write a test suite for the B module.
  • If you override readpipe(), this should overload qx// as well. While we're at it, allow the syntax readpipe PROGRAM LIST, similar to system PROGRAM LIST, to prevent shell interpolation.
  • Cleanup and finish support for assertions.


re

Juerd on 2003-12-03T22:07:45

Allow the syntax my($_) so it creates a brand new lexical variable $_. (local($_) doesn't create a new lexical variable, since it only lexicalises the value, but doesn't remove the magic from the previous $_.)
Do operators that default to $_ then use $::_ or the new lexical $_?

Will it also be possible to have lexical $/, STDIN, ARGV and $<? How do they work?

While we're at it, allow the syntax readpipe PROGRAM LIST, similar to system PROGRAM LIST, to prevent shell interpolation.
Please also allow readpipe LIST, like system LIST.

re II

rafael on 2003-12-03T23:16:42

Lexical $_ : the real goal is to have the built-ins take the lexical $_ if there's any currently in scope. (It's trivial to permit the syntax "my $_" but it's useless if the interpreter doesn't catch up.)

I don't see how a lexical $/ etc. would be useful. The purpose of a lexical $_ is precisely to ensure that $_ is a plain, regular scalar, keeping it away from the influences of outer scopes. Surely you don't want to remove magic from $/.

The readpipe LIST syntax was, of course, implied in my terse notes.