home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!panther!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
- From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
- Subject: explicit sub parameters - a proposal
- Message-ID: <mcook.721530385@fendahl.dev.cdx.mot.com>
- Sender: news@merlin.dev.cdx.mot.com (USENET News System)
- Nntp-Posting-Host: fendahl.dev.cdx.mot.com
- Organization: Motorola Codex, Canton, Massachusetts
- Date: Thu, 12 Nov 1992 01:06:25 GMT
- Lines: 18
-
- What about this idea: perl should allow this construct:
-
- sub foo($a, $b, @rest) {
- # ...
- }
-
- which would be exactly equivalent to
-
- sub foo {
- local ($a, $b, @rest) = @_;
- # ...
- }
-
- That would greatly improve the readability of Perl, I think. (Not to mention
- the fact that people might be less likely to stumble into all the strange
- things that can happen when you start playing around with @_.)
-
- Michael.
-