Improving Compiler Error Messages
Michel Fortin
michel.fortin at michelf.com
Mon May 3 15:30:59 PDT 2010
On 2010-05-03 18:05:11 -0400, Walter Bright <newshound1 at digitalmars.com> said:
> Nick Sabalausky wrote:
>> "Walter Bright" <newshound1 at digitalmars.com> wrote in message
>> news:hrncpk$14t2$2 at 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.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list