D code length vs other languages

German Diago germandiago at gmail.com
Wed Dec 11 13:28:48 UTC 2019


On Thursday, 5 December 2019 at 22:28:53 UTC, Adam D. Ruppe wrote:
> On Thursday, 5 December 2019 at 22:21:13 UTC, Walter Bright 
> wrote:
>> D being about a third less code than C++ is consistent with my 
>> unscientific experience with it.
>
> Indeed, I actually frequently do even less. A lot of repetition 
> in other languages I find myself able to automate pretty well 
> in D. Whole blocks of 1,000 lines of glue code in other 
> languages can be replaced with 30 lines of CT reflection stuff.

This is something that D excels at. That is why I like it. Many 
external
world communication can be done efficiently.

About a third of the code. There are still things in C++20 that 
cannot be
done, but modules will allow to use using directives more 
liberally and they
remove the implicit inline from classes. This means that code 
will get
quite shorter I think. C++20 has a lot of baggage but still stays 
as a very
competent language IMHO.


More information about the Digitalmars-d mailing list