Re:Implementing a Type-safe printf in Rust
by RcouF1uZ4gsC on Friday August 14, 2020 @03:18AM
(#24154808)
Note that this is a similar technique to one done in Andrei Alexandrescu's book Modern C++ Design that used C++98.
IIRC he called it TypeList and used that to actually implement tuple as library type.
When C++11 variadic templates came out, a lot of C++ meta programmers breathed a huge sigh of relief of being able to abandon that technique. In addition, to being a pain to work with, because of the extensive use of recursion, it can take a large toll on compile times.
Variadic templates and being able manipulate tuples generically are probably the two biggest things I miss when programming Rust.
Re:Implementing a Type-safe printf in Rust
by pjmlp on Friday August 14, 2020 @08:06AM
(#24156796)
And with constexpr and its variants, alongside auto templates, fold expressions, and now concepts, yet another legion breathed a huge sigh of relief to be able to abandon all those tag dispatch based techniques.
IIRC he called it TypeList and used that to actually implement tuple as library type.
When C++11 variadic templates came out, a lot of C++ meta programmers breathed a huge sigh of relief of being able to abandon that technique. In addition, to being a pain to work with, because of the extensive use of recursion, it can take a large toll on compile times.
Variadic templates and being able manipulate tuples generically are probably the two biggest things I miss when programming Rust.