[OT] What are D's values?

WebFreak001 d.forum at webfreak.org
Wed Oct 6 05:47:43 UTC 2021


On Tuesday, 5 October 2021 at 14:46:16 UTC, Patrick Schluter 
wrote:
> On Tuesday, 5 October 2021 at 01:33:45 UTC, Paul Backus wrote:
>>
>> Of course, this is not really true in practice. In languages 
>> that don't support DbI, what actually happens is that you do 
>> not write all 2^N customized versions of the code. Instead, 
>> you give up on having individual customized versions for each 
>> use-case and write a single version based on some 
>> lowest-common-denominator abstraction. What you really lose 
>> here are the benefits to performance and expressiveness that 
>> come from having individually-customized versions of your code.
>
> What really happens in other languages is either proliferation 
> of code (copy/paste) or branching at runtime (if cascades, 
> booleans or switch/case).
> The D way may end up adding more code, but code with less 
> branching.

a thing I notice from the C code where I work is that there is a 
lot of copy paste when things are done in a hurry - a thing that 
imo happens a lot less with D because of its wide set of compile 
time features.


More information about the Digitalmars-d mailing list