Why do C++ programmers are not interested in D?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sun Nov 24 13:29:12 UTC 2019
On Sunday, 24 November 2019 at 13:01:13 UTC, Guillaume Piolat
> That doesn't match my experience _at all_. Have you worked in
> C++ in a professional capacity?
Please drop the ad hominems. It is completely irrelevant. (yes,
but still 100% irrelevant).
> C++ has a major version every 3 years, that comes with myriads
> of traps and new best practices.
C++ is seeing growth because it is regularly updated. That's
just a fact. So that is clearly not viewed as a problem with
those that adopt it... (if it was there would be no growth).
However most of the _language_ changes are minor, and either
syntactical sugar for common practice or simplifications of
things that was a drag to write (e.g. template magic being
replaced by CTFE). The biggest semantic change might actually be
metaprogramming things like decltype(), but such changes are not
revolutionary in any way.
Ref. https://en.cppreference.com/w/cpp/language/history C++20
3-way comparison operator <=> and operator==() = default,
designated initializers, init-statements and initializers in
range-for, char8_t, [[no_unique_address]], [[likely]],
[[unlikely]], pack-expansions in lambda captures, removed the
requirement to use typename to disambiguate types in many
contexts, consteval, further relaxed constexpr, signed integers
are 2's complement, aggregate initialization using parentheses,
array new can deduce array size
> The new stuff is non-breaking, except by living in that
> ecosystem you will inevitable be exposed to approximately all
> parts of the language.
Performance oriented libraries are usually conservative in what
they use in the API?
Actually, many C++ codebases on github are C with a bit of C++
here and there...
>> Now we have const, constexpr, if constexpr, consteval and
> Who said C++ was hard to learn/teach?
Well, constexpr on functions is in the same vein as D attributes
like "pure". It should have been the default.
Basically, if for a programmer with a good understanding of C++11
and common C++ patterns with templates then C++14/17/20 is not a
big hurdle to overcome. Now, getting a good understanding of C+11
and common C++ meta-programming patterns is a big hurdle... but
that has nothing to do with language changes. C++ has always been
More information about the Digitalmars-d