On Thursday, 9 April 2015 at 11:04:00 UTC, Dennis Ritchie wrote:
Hi,
Is it allowed in D similar designs?

void main() {
        import std.stdio;
        return writeln("Hello, world!");
}

Yes, because writeln returns nothing, but why would you do that? Just put the return on the next line, it's more readable. Or, in the example above, just omit it entirely as the return is implicit.

Reply via email to