DMD 0.174 release

Walter Bright newshound at digitalmars.com
Tue Nov 14 19:28:03 PST 2006


Stewart Gordon wrote:
> Good work on the whole.  However, I'm puzzled by a few issues:
> 
> 1. At first sight it appears to bear little resemblance to my rewrite. 
> OK, so it implements the distinction between things that introduce a new 
> scope and things that don't, and on closer examination you've taken into 
> account some of the other issues I've raised.  But what's happened to 
> the issue of where a DeclarationStatement or ScopeGuardStatement (fka 
> ScopeStatement) should be legal?
> 
> Moving DeclarationStatement and ScopeGuardStatement from 
> NonEmptyStatement into Statement, NoScopeNonEmptyStatement and 
> NoScopeStatement would achieve the same as my version in this respect.

What I did was carefully go through the parse code, and adjust the 
grammar to exactly match it. So while we can argue about what it should 
be, at least for the moment it matches what the compiler actually does.

> 2. You haven't done the necessary updates to
> 
> http://www.digitalmars.com/d/version.html

I know, lazy me <g>.

> 3. You've added
> 
>     ;
> 
> as a Statement form.  You still haven't told us what the language gains 
> by having it.  OK, so having it in NoScopeStatement simplifies 
> specifying PragmaStatement and LabeledStatement, which are the only 
> things that use it, but in Statement it appears to serve no purpose.

It can also appear in case statements and default statements.

> 4. Why do ForStatement and ForeachStatement now take a 
> NoScopeNonEmptyStatement as body, rather than a ScopeStatement?

The scope is created by the for initialization, not the body.



More information about the Digitalmars-d-announce mailing list