Breaking changes in Visual C++ 2015
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Fri May 8 02:52:05 PDT 2015
On Friday, 8 May 2015 at 08:51:24 UTC, Walter Bright wrote:
> On 5/8/2015 12:45 AM, weaselcat wrote:
>> some of these really are klunky though.
>
> Nobody's ever satisfied. Doesn't mean the tools aren't
> effective, and doesn't mean a "complete lack of tooling".
>
> I find:
>
> dmd std/algorithm -main -unittest -cov
>
> quite far removed from 'klunky'. How do you do it in [pick a
> language]?
>
>
>> e.g, if D's built-in unit testing is so good, why are there
>> eight packages for
>> unit testing on dub?
>
> I haven't used them, and so have no opinion on them. I use the
> builtin capability every day I am working on D code, and find
> it easy and indispensable.
Well, I have to say that I love what D has done with unit tests
and code coverage. It's not perfect, but the fact that it's
built-in makes it extremely easy to use and embarrassing if you
don't. And on the whole, I really don't see the need for some of
the kinds of features that others complain about D missing.
That's not to say that there's not value in some of those
features, but I think that the language itself has a very good
foundation for unit testing with covers the 90% case, and if
others want to create their own unit testing frameworks to handle
more complex cases, they're certainly free to do so.
For larger projects, I'd probably want to be able to have names
for the unittest blocks and have the be printed as the tests run,
but that's easy enough to add (albeit possibly a bit tedious).
So, I really haven't found D's built-in unit test framework to be
particularly lacking, and based on discussions on it in the past,
I think that it's quite clear that there would be a lot of
disagreement on how it should be changed if we were looking to
add to the language itself some of the features that those 3rd
party unit test frameworks have.
Certainly, being able to just put unit tests in my modules rather
than having to find and link against a 3rd party unit test
framework is a definite improvement over other languages that
I've used. And even if someone prefers one of the unit test
frameworks on code.dlang.org, it's not like that's any worse than
other languages where you _have_ to use a 3rd party unit test
framework. So, while I can understand someone wanting the
built-in unit test framework to do more and being frustrated with
that is understandable, I think that a bit of perspective is in
order. After all, what other language has unit tests built in at
all?
- Jonathan M Davis
More information about the Digitalmars-d
mailing list