I’ve started running into a few tools related to either adding Scala features into C++, or targeting/translating Scala to a non-JVM environment. I’m starting this topic just as a placeholder for links to those things.
jtransc can convert Java/Kotlin/Scala to run on non-JVM runtimes, in particular
either JavaScript (for running Scala in a browser) or C++ with its own runtime
library jtransc-rt-core. With the reliance on jtransc-rt-core I’m not sure how much
this ends up looking authentic C++ - I think it does at least convert String to
std::string.
http://www.stroustrup.com/OpenPatternMatching.pdf
Paper by Solodky, Dos Reis, Stroustrup about the Mach7 pattern-matching library
for C++.
http://davidsankel.com/uncategorized/c-language-support-for-pattern-matching-and-variants/
Discussion of proposals for adding pattern-matching to a future (post-C++17) language standard.
Experimental pattern-matching library for C++17