What are the worst parts of D?
eles via Digitalmars-d
digitalmars-d at puremagic.com
Thu Sep 25 13:40:50 PDT 2014
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/ljr5n7$1leb$1@digitalmars.com
"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.
"
More information about the Digitalmars-d
mailing list