3 ms·
I have seen more than one such compiler, usually from Haskell-like dialects to C++ metafunctions (e.g., http://gergo.erdi.hu/projects/metafun/ http://gergo.erdi
by pbsd 12y ago
I have seen more than one such compiler, usually from Haskell-like dialects to C++ metafunctions (e.g., http://gergo.erdi.hu/projects/metafun/ http://gergo.erdi.hu/projects/metafun/).
In this case the metaprogramming seems unnecessary---even assuming that it makes any sense to run a snake game at compile time---since C++14's relaxed `constexpr` functions are a much more readable way to achieve the same thing. Metaprogramming is only required now when types need to be computed; most of everything else is more cleanly done with `constexpr`.