From: "Hal E. Fulton" Date: 2002-06-12T07:18:22+09:00 Subject: Re: ruby-dev summary 17252-17356 ----- Original Message ----- From: "Dave Thomas" To: "ruby-talk ML" Sent: Tuesday, June 11, 2002 4:07 PM Subject: Re: ruby-dev summary 17252-17356 > > In that case, what does the semicolon mean? > > It separates parameters from variables which are local to the block. [snippage] Well, Matz is much smarter than I am... but this makes me wince. Complaint #1: This introduces an ordering constraint on the items. If the "natural" order is a,b,c but we need b to be local, we will write something like |a,c;b| Complaint #2: The case is exceptionally annoying to me if I understand it correctly. Doesn't it send two contradictory messages (to the reader) about x? The fact that it appears on the lefthand side of the semicolon says it's nonlocal; but the fact it's in brackets says it's local. > As a somewhat tongue-in-cheek alternative (which breaks backwards > compatibility) we could have 'do!' which inherits variables from the > enclosing scope and 'do' which doesn't... Sure, and let's have { and {! also... that's even *more* tongue-in-cheek. I still wish we could use something other than <> for the new notation. At the least I'd prefer something that didn't balance left-right (as || doesn't). But we run out of punctuation, don't we? On American non-APL keyboards, anyway. For another less-than-half-serious suggestion: I propose we use /.../ instead of <...> How to distinguish this from an expression starting with a regex is left as an exercise for the parser. ;) Hal Fulton