3 ms·
It is really not a problem for even a very simple compiler to rewrite "{a}{b}" into a simple function call. I'm not sure what you mean by "runtime introspectio
by int_19h 3y ago
It is really not a problem for even a very simple compiler to rewrite "{a}{b}" into a simple function call.
I'm not sure what you mean by "runtime introspection" in this context, because literals with embedded expressions don't require any runtime parsing or lookup - such a literal is parsed completely at compile-time, and in languages with lexical scoping, all variables etc are resolved then. It really is just syntactic sugar for concatenating; it's not at all like runtime templates.