On 1/27/11 8:02 PM, Walter Bright wrote:
Tomek Sowiński wrote:
Walter Bright napisał:

bearophile wrote:
Walter:

The reason that took so long was that few people were using DbC
effectively, so it was a low priority. I originally had high hopes
that
DbC would produce dramatic improvements in code quality, but the real
world results were disappointing.<
After many years and many failed hopes, I think there is no silver
bullet
in programming, so maybe nothing is able to produce "dramatic
improvements in code quality".

But even if this is true, some things are able to improve coding a bit,
like unit testing, a well semantically defined language, syntax
coloring,
quick compile-run cycles, OOP for certain kinds of programs, DbC,
and so
on. Each of such things improve the situation only a little, but such
improvements pile up and most programmers when have tried them don't
want
to go back to miss those things.
Unit testing has produced a dramatic improvement in coding.

Yes, it's big. Funny that it's not really a technical change but a
cultural
one -- D just leaves no excuses to even the most stone-age programmers
not to
test their code.

I was talking about this with Andrei the other day. D's focus on making
it easy to do things the right way has paid off handsomely, though this
is not at all obvious from reading a feature list. It only becomes clear
when you use it for a while, and then try to go back to the way you were
doing things before.

Although this might as well be true, I generally try to avoid such arguments. The problem with it is it's non-falsifiable (http://en.wikipedia.org/wiki/Falsifiability) so it has a certain stench coming with it.

I've seen such a claim in Go fora: you know, once you get to really use Go, you won't feel the need for generics. Meh.

I try to _never_ use such an argument. If I'm to convince anyone that D rocks, it won't be by means of unfalsifiable statements. It will be by showing code that knocks your socks off. The kind of code that makes you think: "If I'm to write that in language X, I need to give away desirable traits A, B, and C. Damn!"

I think one of the reasons DbC has not paid off is it still requires a
significant investment of effort by the programmer. It's too easy to not
bother.

One issue with DbC is that its only significant advantage is its interplay with inheritance. Otherwise, scope() in conjunction with assert works with less syntactic overhead. So DbC tends to shine with large and deep hierarchies... but large and deep hierarchies are not that a la mode anymore.


Andrei

Reply via email to