On Thursday, 25 September 2014 at 15:58:11 UTC, eles wrote:
On Thursday, 25 September 2014 at 13:50:10 UTC, Jacob Carlborg wrote:
On 25/09/14 09:38, Atila Neves wrote:


Andrei spoke about an idiom that they constantly use at Facebok, because there aparrently nobody runs *main and unittests*. So they keep a special empty main for the -unittest version.

This idiom here:

http://forum.dlang.org/post/[email protected]

"Last but not least, virtually nobody I know runs unittests and then
main. This is quickly becoming an idiom:

version(unittest) void main() {}
else void main()
{
   ...
}

I think it's time to change that. We could do it the
non-backward-compatible way by redefining -unittest to instruct the
compiler to not run main. Or we could define another flag such as
-unittest-only and then deprecate the existing one.
"

Reply via email to