Show HN: Cppmatch – Rust-Like Pattern Matching and Error Handling for C++

  • https://libfn.org/ also is worth a look.

  • This is great! Thanks for sharing, it is a cool idea to try bringing QoL improvements from Rust to C++. Got a question:

    Does this prevent the RVO/NRVO compiler optimizations for return values? And when those fail, same question for the move-construction for types that do have a move constructor.

  • Have you considered using the immediately invoked function expression (IIFE) pattern as a standards-compliant alternative to gcc statement expressions?

  • [flagged]

  • Please leave that Frankenstein of a language alone. Stop bolting features on it, it's already a monster.