3 ms·
I don't know, Boost has me convinced that even things like regexes in C++ templates could be possible, if your compiler has a big enough stack to handle very de
by jordigh 10y ago
I don't know, Boost has me convinced that even things like regexes in C++ templates could be possible, if your compiler has a big enough stack to handle very deep template recursions. It's theoretically possible to build a regex parser in C++ templates, right? It would be horrible, but possible.
- humanrebar 10y ago> It's theoretically possible to build a regex parser in C++ templates, right? You'd probably do large portions of it in "constexpr" types and functions rather than relying on recursive metaprogramming techniques. They are also planning on adding overloading based on whether a function is constexpr, which is important if you want the same library to support both compile-time and run-time matchers. So it's all theoretically possible already. But D has the advantage here in that it's not just possible but usable.
- qznc 10y agoWith D it is possible and not horrible and already done. ;) Talk: http://dconf.org/2014/talks/olshansky.html http://dconf.org/2014/talks/olshansky.html