3 ms·
Key point: > In practice, compilers limit template instantiation depth, so this is more of a theoretical problem than a practical one.
by einpoklum 7y ago
Key point:
> In practice, compilers limit template instantiation depth, so this is more of a theoretical problem than a practical one.
- seanmcdirmid 7y agoMagic numbers to limit undecidability are incredibly fragile. You think you have all the cases covered and another comes up, or the numbers need to be enlarged because of some reasonable code being rejected. Better to have this problem in the parser than the type checker, at least.
- einpoklum 7y agoThere's no assumption that all the cases are covered up. Only some. The point is - in practice, don't try to go in too deep with templates.