Improving Compiler Error Messages
Michel Fortin
michel.fortin at michelf.com
Mon May 3 13:12:39 PDT 2010
On 2010-05-03 16:07:34 -0400, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> said:
>>> foo((int i) { writeln(i) });
>>
>> Yea, that's a case of optional-semicolon that even I'd like to have
>> (And I've suggested it before).
>
> Actually that doesn't work as well as one might expect. In the Cecil
> language, the return type of a function would depend on whether it
> ended with a semicolon (void if present, something else if absent). Not
> very robust.
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?
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list