A valid function with no return type?

Dominikus Dittes Scherkl dominikus at scherkl.de
Fri Sep 25 07:23:08 UTC 2020


On Friday, 25 September 2020 at 02:45:16 UTC, Meta wrote:

> Qualifiers yes but not return types/storage classes, isn't it? 
> `ref` here is not a qualifier on the function; it's specifying 
> the storage class for the return type.

This is a restriction not from the language, but from the caller 
of main - the system.
If you have a system that could interpret more complicated return 
values from a program, it would be no problem to allow such in 
the language. But at least for the systems I know (posix, 
windows, macOS) this is not the case.


More information about the Digitalmars-d mailing list