Comment by jstimpfle
9 months ago
Heh, mentioning metaprogramming and logging is not exactly how you convince anybody of superior ergonomics and usability.
9 months ago
Heh, mentioning metaprogramming and logging is not exactly how you convince anybody of superior ergonomics and usability.
Metaprogramming is required to get typesafe easy to use code. The problem of most template code is that the implementation gets horrendously complicated but for the user it can create A LOT of comfort. At work for example, I wrote a function that calls an rpc-method and it has a few neat features like:
An rpc call with a result looks like this:
call(<methodinfo>, <param>, [](Result r) {});
vs one which returns void:
call(<methodinfo>, <param>, []() {});
It's neat that the callback reflects that, but this wouldn't be possible without some compiletime magic.
It convinced me