Minor feature request
Superstar64 via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 27 23:13:44 PDT 2016
Right now, D functions expect a Block Statement
(https://dlang.org/spec/function.html#FunctionBody) as their
function body. Changing that to allow any statement
(https://dlang.org/spec/statement.html#Statement) would provide a
few new syntactic sugars like:
---
auto func(MyObj obj) with(obj)
{
//...
}
auto func(int arg) return arg;
auto func() try
{
//...
}
finally
{
return //...
}
---
More information about the Digitalmars-d
mailing list