3 ms·
As technically interesting this is, it's certainly going to be surefire way to kill your compile time :-)
by Zagitta 5y ago
As technically interesting this is, it's certainly going to be surefire way to kill your compile time :-)
- beached_whale 5y agoDoes it matter? Put it behind a method, such as parse_foo( string_view ), and firewall it into it's own TU. One only needs to compile it when the parser requirements change
- gpderetta 5y agoIt would be interesting to compare compiling a grammar written with this against generating it with flex/bison and compiling the generated code.
- hamstergene 5y agoHas there been any credible study of compile-time cost of constexpr vs. template metaprogramming? I am assuming template metaprogramming is so bad because even elementary data structures have to employ ton of helper types that have to be matched/deduced against gigantic list of all other types and kept all in memory, while straightforward interpretation should not need any of that. I would expect constexpr to perform similarly to interpreted languages, which should be no different than invoking an external code generator written in Python, for example.
- anamax 5y agoYou say that like it's a bad thing. https://xkcd.com/303/ https://xkcd.com/303/