No -c no main()

Yigal Chripun yigal100 at gmail.com
Fri Mar 20 06:11:28 PDT 2009


On 20/03/2009 13:11, Mike Parker wrote:
> I understand what you were suggesting. My point is that in Java, which
> entry point to use is decided at run time, not compile time. From that
> perspective, it's a useful feature. For a statically compiled language
> like D, I don't see any obvious benefit. I mean, what is the benefit of
> this over delegating to a specific pseudo-main method based on a
> commandline arg or config file?

to add to what Ary and bearophile already said, that can be even more 
useful if it's combined with D's unittesting features. for example the 
main() could specify what unit-tests to run and in what order, provide 
the before & after code, etc..



More information about the Digitalmars-d mailing list