How does D improve design practices over C++?
Christopher Wright
dhasenan at gmail.com
Wed Nov 5 15:39:52 PST 2008
Janderson wrote:
> Tony wrote:
> > "Janderson" <ask at me.com> wrote in message
> news:gepsn2$21jr$1 at digitalmars.com...
> >> Tony wrote:
> >>> Let me be facetious with Janderson's list plz...
> >>>
> >>> "Janderson" <ask at me.com> wrote in message
> news:ge8tpd$1f6b$1 at digitalmars.com...
> >>>> Hi,
> >>>>
> >>>> I was talking with some collages at work and they asked me how D
> enforces good programming practices. For course I mentioned a couple
> of the ones I knew of hand -
> >>>>
> >>>> - Unit checking
> >>> Not sure what is meant by this, but it sounds minor.
> >> Sure C++ can do unit checking, but its not built in. You have to
> use macros or templates in something that is not really designed to work
> correctly with the language. Even if you ignore that there's a barrior
> to entry by not having something like this in the language. By having
> it in the language good coding practices are encouraged.
> >
> > I write unit tests. I don't know why I'd need or want language
> support for that.
>
>
> What api do you use? All the api's I've used are not as nice as the
> built in one for D.
This is a joke, right?
The code you need to write for a unittest is a lot smaller for D's
builtin unittests than for any other testing system I've seen. That's
the only category in which D's unittests win.
This is mostly the fault of the unittest runners in Tango and Phobos,
I'd wager, but you still won't be able to name unittests without
changing the compiler, and that's a major issue, in my opinion.
More information about the Digitalmars-d
mailing list