News for hackers. Stuff that matters.
Re:The reference D compiler is now open source by jordigh on Friday April 07, 2017 @01:34PM (#14061726)
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.
Re:The reference D compiler is now open source by qznc on Friday April 07, 2017 @01:57PM (#14061978)
With D it is possible and not horrible and already done. ;)

Talk: http://dconf.org/2014/talks/olshansky.html

Re:The reference D compiler is now open source by humanrebar on Friday April 07, 2017 @02:39PM (#14062377)
> 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.