This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Allow keywords in sub prototypes =head1 VERSION Maintainer: Simon Cozens <[EMAIL PROTECTED]> Date: 25 Sep 2000 Mailing List: [EMAIL PROTECTED] Number: 309 Version: 1 Status: Developing =head1 ABSTRACT This is a general way of helping people create their own syntax. =head1 DESCRIPTION The perlsub documentation talks about the use of C<&> in a prototype: The interesting thing about C<&> is that you can generate new syntax with it, provided it's in the initial position Well, you can, within limits. But it would fix a lot of things that people believe they want if you could B<really> define your own syntax. sub apply (& to @) { ... } apply { this } to @that; =head1 IMPLEMENTATION This becomes a B<little> bit of a nightmare for the parser; but TeX manages it. In fact, it's not as hard as it looks, because you still know what you're expecting: after a block, we want some whitespace and the keyword "to", then some more whitespace and an array. Since we may well be having the parser dynamically modifiable, this should be easy. Yeah, right. =head1 REFERENCES RFC 57: Subroutine prototypes and parameters L<perlsub|perlsub> RFC ??: Byte-compiled Parser RFC ??:C<use syntax>