Possible enhancement: Concise return statements

Jacob Carlborg doob at me.com
Tue Aug 16 00:09:31 PDT 2011


On 2011-08-15 22:06, Walter Bright wrote:
> On 8/15/2011 12:19 PM, Jacob Carlborg wrote:
>> Can't we always automatically return the last expression, even if it
>> ends with a
>> semicolon?
>
> It interferes with auto return typing (such as void returns).

Don't know if this apply in this case but couldn't all lambdas/delegates 
that return something be implicitly converted to delegate/lambda of the 
same signature but that returns void instead. I would be like calling 
the delegate but not doing anything with the return value.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list