C++ pattern matching is coming

German Diago germandiago at gmail.com
Tue Oct 25 10:18:53 UTC 2022


On Monday, 24 October 2022 at 22:26:41 UTC, Walter Bright wrote:
> The design of dip1000 does not preclude this, however, and it's 
> good to see how far we can push things and avoid needing such 
> complexity.


I am glad to see a language that is C-like, understandable, 
trying to not put
all the heavy-weight on the programmer but allowing it where it 
is necessary. This is what kept me with C++ and not Rust so far. 
Rust is just too rigid and restrictive for a lot of legal coding 
patterns.

As a long-time C++ user (20 years using it non-stop) D, combined 
with its powerful import('file.ext'), powerful metaprogramming, 
C/C++ linkage compatibility and interaction  and now DIP1000, and 
a more than reasonable standard library with Ranges, sumtypes and 
powerful type meta-programming and concurrency it is getting very 
attractive, at the top of the list: more than Zig, Rust or Nim.

Of course, I am more familiar with C++ than anything else. But 
this is a selling point for me: if you jump to Nim/Zig/Rust you 
are, in some way, in more foreign territory.

I wonder how the status is implementation-wise, that is the part 
that scares me a bit to jump in.

I think the tooling needed some love though I did not try 
recently.

Congrats for the hard work, it has been a ton of years but you 
show a lot of practical, real-life use in your decisions.

My advice would to sell D as an industrial language that can be 
incrementally adopted from C++ with safety and compatibility 
guarantees, besides the metaprogramming, beyond what the 
competition can achieve.


More information about the Digitalmars-d mailing list