Parallel execution of unittests

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Mon May 5 06:27:03 PDT 2014


On Mon, 05 May 2014 11:26:29 +0000
bearophile via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> Jonathan M Davis:
> > Such code should be kept separate IMHO.
>
> This means that you now have two modules, so to download them
> atomically you need some kind of packaging, like a zip. If your
> project is composed by many modules this is not a problem. But if
> you have a single module project (and this happens often in
> Python), going from 1 to 2 files is not nice. I have written tens
> of reusable D modules, and some of them have a demo or are usable
> stand-alone when you have simpler needs.

Honestly, I wouldn't even consider distributing something that was only a
single module in size unless it were on the scale of std.datetime, which we've
generally agreed is too large for a single module. So, a single module
wouldn't have enough functionality to be worth distributing. And even if I
were to distribute such a module, I'd let its documentation speak for itself
and otherwise just expect the programmer to read the code.

Regardless, the version specifier makes it easy to have a version where main
is defined for demos or whatever else you might want to do with it. So, I'd
suggest just using that. I highly doubt that you'd be able to talk either
Walter or Andrei into supporting a separate feature for this. At this point,
we're trying to use what we already have to implement new things rather than
adding new features to the language, no matter how minor it might seem. New
language features are likely be restricted to things where we really need them
to be language features. And this doesn't fit that bill.

- Jonathan M Davis


More information about the Digitalmars-d mailing list