| perl6 Simplify do BLOCK Syntax |
Simplify do BLOCK Syntax
Maintainer: Mark Senn <mds@purdue.edu> Date: 26 Aug 2000 Last Modified: 29 Aug 2000 Mailing List: perl6-language@perl.org Number: 167 Version: 2 Status: Developing
Simpify syntax of do BLOCK by deleting do before the block and ; after it.
One of the most common mistakes I make is forgetting a ; after do BLOCK, probably because I'm thinking ``if'' and an if doesn't require a : after it's closing }. I'll type, for example,
$cond and do {
# statements
}
instead of
$cond and do {
# statements
};
Can the syntax be simplified to drop the ;, and while you're at it, how about the do also, so one can type
$cond and {
# statements
}
If the do and ; are redundant should they be eliminated to obey the rule:
Omit redundant punctuation as long as clarity doesn't suffer.
on page 604 of Camel III?
Unknown.
Camel III, pages 123--125, 604
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|