Signature of main [was Sockets between D and C(++) app]

bearophile bearophileHUGS at lycos.com
Wed Apr 2 04:24:17 PDT 2014


Russel Winder:

> what is the real signature in D?

The _real_ signature of main() is flexible, you can use:

void main()
int main(in string[] args) pure nothrow

D allows you to omit the args if you don't need them, returns 0 
if you don't it, and it can be pure/nothrow/@safe as desired.


> Perhaps this exception should be removed.

This special cases cause zero bugs and zero problems, so there is 
no chance to change this, even if we want (and I don't want).

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list