On 5/4/10 00:30, Michel Fortin wrote:
On 2010-05-03 18:05:11 -0400, Walter Bright <newshou...@digitalmars.com>
said:

Nick Sabalausky wrote:
"Walter Bright" <newshou...@digitalmars.com> wrote in message
news:hrncpk$14t...@digitalmars.com...
Michel Fortin wrote:
That's an argument against returning the value of the last
statement. It's not an argument about making the last semicolon
optional, is it?
Yes, it is an argument against it. It means the semantics can vary
dramatically depending on whether a ; is present or not.

But that's only true when the language, unlike D, has implicit
returns, right?

Right. But D (and C, C++) do not have implicit returns, and so this
syntax is not right for them.

Ok, so to summarize, your opinion is:

1. omitting the last semicolon looks like an implicit return
2. implicit returns are too subtle, won't add to D
3. since D has no implicit returns, omitting the last semicolon is not
accepted

I disagree about 1, and thus about 3 since it derives from 1. But that's
probably just because of our different background, so I'll leave it at
that.

I guess D isn't created with delegate literals in mind as one of the most important features, like Ruby or Scala.

Reply via email to