Guillaume Piolat Posted in reply to lagfra



Permalink Reply

On Wednesday, 14 November 2018 at 15:07:46 UTC, lagfra wrote: > https:// www.red dit.com/ r/cpp/ comments/ 9vwvbz/ 2018_san_ diego_iso_c_ committee_ trip_ report_ranges/ > > By 2020 C++ is planning to introduce: > > * Ranges > * Contracts > * Concepts (`__traits`) > * Proper constexpr > * Modules > * Reflections > * Green threads > By 2020 C++ is planning to introduce:* Ranges* Contracts* Concepts (`__traits`)* Proper constexpr* Modules* Reflections* Green threads http:// www.open- std.org/ jtc1/sc22/ wg21/docs/ papers/ 2018/p10 73r2.html ). No new keyword was used for the D version of CTFE. Similarly, `if constexpr` is strictly less useful than `static if` since it introduces a scope. See the workaround here: https:// stackove rflow.com/ questions/ 46880578/ scope-of- variables- declared- inside-if- constexpr- blocks < back to where we were with enable_if in terms of code size. Regarding modules, they were proposed and reported in two C++ standards already. Same for concepts. Ultimately all this doesn't matter much since: - the C++ culture of using cmake/makefiles over a declarative build system will not change (see the demise of biicode) - avoiding the latest language addition to keep compatibility is necessary in C++, with divergent frontends - existing codebases are still C++98 for the most part D has the chance to have a community : - for which template meta-programming is simple, well understood and almost boring - which is willing to build an ecosystem (but not enough) > > what are the advantages of using D vs C++ if my goal is to build a complex system / product? Easy: your struggle to learn the D language will have an ending. Which lead to reduced mental load forever - without compromising anything in power. > TL;DR: what will D offer with respect to C++ when almost all key features of D are present in C++20(+)? Sanity.