3 ms·
One can only imagine the error messages from the c++ layer after a semi-botched circle compile!
by amiga_500 6y ago
One can only imagine the error messages from the c++ layer after a semi-botched circle compile!
- klyrs 6y agoI'm not sure about other compilers, but I use gcc. Mild errors in templates can produce reams of errors, the first of which might have a good hint, and if not, the actual error is tucked away in, perhaps, the third attempted template substitution. This is a very valid concern. Good error messages are hard to produce, and gcc doesn't even try to figure out which brackets are mismatched. Mix that in with a supercharged comptime constructions, and I'm quite terrified. I don't have these issues with macros anymore, thanks to templates, but I nearly prefer them.
- orbifold 6y agoThere is no separate C++ layer and the nice thing is that you can just use exceptions at compile time to signal errors. So the errors are actually much nicer than with template meta programming.
- lasagnaphil 6y agoActually the error messages are much nicer than you've thought. Here's an example: $ circle taco4.cxx -I /home/sean/projects/opensource/taco/include -M /home/sean/projects/opensource/taco/Debug/lib/libtaco.so -filetype=ll Creating compute_1 function macro expansion: taco4.cxx:428:3 error in expansion of macro auto call_taco(const char*, const options_t&) code injection: taco4.cxx:420:6 error thrown in @expression("c") error: @expression:1:1 undeclared identifier 'c' A well-defined meta language would probably have way better error messages than an accidentally-discovered language based on insane template hacks.