Making D better than other programming languages (warning: rant, drivel)

Don Clugston dac at nospam.com.au
Tue Oct 31 01:22:02 PST 2006


Dave wrote:
> Walter Bright wrote:
>> LaggedOnUser wrote:
>>> The best metric for productivity across languages appears to be Lines 
>>> of Code (LOC).  The productivity for a typical programmer is inversely
>>> proportional to the number of lines of code he/she has to write.
>>
>> I agree. My experiments with real D projects compared with their 
>> equivalent C++ ones is that the D ones about about 30% less source code.
>> If the proportionality rule applies, that makes it 30% more productive.
>>
>>> That "something else" is probably the fact
>>> that both are essentially dynamically-typed, easy-to-use, scripting 
>>> languages that are terse and expressive.
>>
>> I think the dynamic typing thing along with gc are the big 
>> productivity drivers.
>>
> 
> In the link for the OP, one thing that apparently wasn't considered or 
> adjusted for is how many errors during development, and how long it took 
> to find those errors.

I agree. There's an interesting issue with using LOC as a productivity 
metric -- in my experience, unit tests are one of the ways that D gives 
a massive productivity boost, yet they result in an *increase* in the 
lines of code!

It's rare that you see productivity data that includes refactoring. Yet 
maintainability is surely one of the most important aspects of coding.

> Often I see that dynamic typing will mask errors, and make them a lot 
> more time consuming to both debug and (sometimes) workaround once they 
> are found. And often they make it through to production code as well.
> 
> So I'm wondering if, in the grand scheme of things, dynamic typing 
> really accounts for a 2.5x difference in productivity anyhow?

I suspect it doesn't scale very well. (Like not requiring you declare 
variables -- looks great on a 10 or 20 line program, a complete disaster 
on anything bigger).



More information about the Digitalmars-d mailing list