4 ms·
> which ones lead you to the performant path naturally D's big advantage is the plasticity of the code, meaning it's much easier to try out different data stru
by WalterBright 7y ago
> which ones lead you to the performant path naturally
D's big advantage is the plasticity of the code, meaning it's much easier to try out different data structures and algorithms to compare speed. My experience with C and C++ is they're hard to change data structures, meaning one tends to stick with the initial design.
For a smallish example, in C one uses s.f when s is a value of a struct, and s->f when s is a pointer to a struct. If you're switching from one to the other, you have to go through all your code swapping . and ->. With D, both are .
- totalperspectiv 7y agoThat's an excellent point. There was a neat paper a few years back where they were making the point that Java could actually lead to better performance in complex scenarios than c or c++ because the team could iterate on the algorithm faster and explore different paths.
- riffraff 7y agoThis is also the same claim that gets mentioned when k comes up: the shortness of programs leads to finding better solutions.