home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!decwrl!mips!mips!odin!stantz
- From: stantz@sgi.com (Mark Stantz)
- Subject: Re: 4.035 bug or feature...why does this run?
- Message-ID: <1992Aug28.213055.20343@odin.corp.sgi.com>
- Sender: news@odin.corp.sgi.com (Net News)
- Nntp-Posting-Host: sierra.corp.sgi.com
- Organization: Silicon Graphics, Inc.
- References: <1992Aug27.171036.28995@odin.corp.sgi.com> <BtnMC5.51s@news.cso.uiuc.edu> <1992Aug28.185620.9841@netlabs.com>
- Date: Fri, 28 Aug 1992 21:30:55 GMT
- Lines: 31
-
- In article <1992Aug28.185620.9841@netlabs.com> lwall@netlabs.com (Larry Wall) writes:
- > 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;
-
- Er... what was wrong with:
-
- sort { $a <=> $b; } @list;
- sub println { print @_,"\n"; }
- do { &one; } until $done;
-
- Or is this one of those religious arguments again?
-
- Such arguments notwithstanding, my concern is that now and then I
- just plain forget to put the semi-colon at the end of a line. Call it a typo
- or a mental lapse. Usually perl complains and I fix it instantly...it's not
- really a problem, and the same thing happens to me in C all the time. The
- real trouble comes when you post code to the net not realizing that you
- forgot one of those semi-colons, and it doesn't run for half the people that
- try to use it, even though it works fine for you.
-
- At the least, 'perl -w' should warn you about the backward
- incompatability problem.
-
- -Mark
-