home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!news!netlabs!lwall
- From: lwall@netlabs.com (Larry Wall)
- Newsgroups: comp.lang.perl
- Subject: Re: 4.035 bug or feature...why does this run?
- Message-ID: <1992Aug28.185620.9841@netlabs.com>
- Date: 28 Aug 92 18:56:20 GMT
- References: <1992Aug27.171036.28995@odin.corp.sgi.com> <BtnMC5.51s@news.cso.uiuc.edu>
- Sender: news@netlabs.com
- Organization: NetLabs, Inc.
- Lines: 27
- Nntp-Posting-Host: scalpel.netlabs.com
-
- In article <BtnMC5.51s@news.cso.uiuc.edu> ejk@ux2.cso.uiuc.edu (Ed Kubaitis - CCSO) writes:
- : -->Subject: relaxed requirement for semicolon at the end of a block
-
- Yes, but note that it's still recommended that you use semicolon in
- general. You *have* to use it if you want to be backward compatible.
- You *ought* to use it for readability and ease of maintenence unless
- you're writing very short block that fits on one line along with its
- braces:
-
- sort { $a <=> $b } @list;
- sub println { print @_,"\n" }
- do { &one } until $done;
-
- but
-
- do {
- &one; # Put semicolon in case you add another statement after.
- } until $done;
-
- Basically, it's one of those features that you can't use in a portable
- program right now, but maybe in a year or two it'll start to be considered
- portable when most everyone's running version 5.
-
- (On the other hand, I *still* don't use enums in C. Probably mere paranoia
- by now...}
-
- Larry
-