Compare boost::hana to D

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 21 23:08:21 PDT 2017


On 4/19/2017 3:58 AM, Laeeth Isharc wrote:
> I think not enough has been written on D's plasticity - Andrei and Walter talk
> about it in passing a couple of times.  But I have the impression that it's
> maybe quite important for merits of D's real world commercial value. Compare
> using refactoring  tools with not really needing them to same extent.

It's a really hard idea to get across.

Back when I wrote in C and C++, usually the first algorithm and data structure I 
picked persisted through to the end of life of the program. I'd optimize the 
hell out of it, but I didn't change it.

But with D, I find I redo the algorithms and data structures, trying to find one 
that works better. The Warp project is a particular example of that.

In C/C++, changing the algorithm/data structure meant rewriting the program. D 
makes it easy to change that without major rewrites, so it's much more likely 
that I'll be willing to change it.

Other explanations for this are:

1. I'm better at encapsulating algorithms and data structures

2. D's unit test feature makes me much more confident in making changes.

I can't help but think it is more than that. In D my programs just go together 
faster, and have fewer bugs. The code tends to look more like a solution to the 
problem rather than a mass of ->::<> and other syntax.

But these things are hard to get across in a presentation, so instead I talk 
about features, and the audience goes "well I can do that in C++/Rust/Go" even 
if it is awkward or requires a 3rd party tool or whatever.


More information about the Digitalmars-d mailing list