D Language Foundation Monthly Meeting Summary (September 24, 2021)

IGotD- nise at nise.com
Mon Oct 4 18:08:31 UTC 2021


On Monday, 4 October 2021 at 15:44:11 UTC, Ki Rill wrote:
>
> About (1): I've written some C++ code recently. I was very 
> happy with the code. I've read the code multiple times in 
> search for potential bugs and errors. I decided to rewrite some 
> of the code in D just to see the difference code-wise and 
> performance-wise. Guess what happened? It didn't compile. I got 
> out-of-bounds access error in D meanwhile the C++ version ran 
> happily with no sign of any failure.

That's a classic with C++ and static arrays. C++ now has the STL 
array which is standard now but who cares because not many know 
about it and there so many ways to do the same things in C++ you 
get lost. Also, it's ugly.

In the case for D, I think D is a "sky is the limit" kind of 
language. D handles so many different areas, from low level to 
rather high level quite nicely. However, this together with one 
of the best metaprogramming out there, the versatility of the 
language is really among the highest.

Now, the metaprogramming in C++ is just as powerful but not many 
people can handle it and they tend to avoid more complicated 
solutions. With D, metaprogramming is much more approachable and 
tasks that the programmer was unable to do in C++ can be done in 
D relatively easy.


More information about the Digitalmars-d-announce mailing list