News for hackers. Stuff that matters.
Re:The first new build of Circle, a new C++20 compiler, sinc... by Yoric on Monday January 23, 2023 @09:06AM (#34488826)
Out of the box, they can't, but I can imagine mitigations for that, if you have robust enough static analysis on your new language. For many cases, it's fairly trivial to generate a piece of .cpp that simply instantiates a template for a specific type and can be linked against.

Of course:

- this doesn't cross library boundaries;

- this assumes robust enough static analysis, which is not possible in the general case, since templates are non-decidable in the general case – so you need to restrict your new language to more reasonable semantics;

- let's not even get started on the interaction between templates and C-style macros – at some point, you need to throw the towel.

There are no comments on this comment yet.