RFC 342 (v1) Pascal-like "with"
[email protected] (Perl6 RFC Librarian) 29 Sep 2000 03:32:17 -0000
| Newsgroups | perl.perl6.announce.rfc,perl.perl6.language |
|---|---|
| Message-ID | <[email protected]> |
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Pascal-like "with" =head1 VERSION Maintainer: David Nicol <[email protected]> Date: 28 Sep 2000 Mailing List: [email protected] Number: 342 Version: 1 Status: Developing =head1 ABSTRACT We adopt Pascal's very useful C<with> syntax =head1 DESCRIPTION %record = loadrecord($studentID); with %record { open SPAM, $PreferredSpam; print <<SPAM; Dear $Name: Your tuition is now due. Please send in a payment of at least $Minumum. SPAM }; All existing keys of C<%record> hide similarly named variables, if any, within the C<with> block. These things can nest. =head1 IMPLEMENTATION within a C<with> block, unqualified variable names must be checked against the C<with> name space before being instantiated. In concert with named packed structure types serious optimizations could be achieved. =head1 REFERENCES "Learning Pascal" textbook, CS101, 1985