| ▲ | bloppe 44 minutes ago | |||||||
Lazily emitted from what? You would need information about the type at runtime to derive the implementation, and normally that information is not available at runtime. The debug implementation itself is probably within spitting distance of any other representation that would be sufficient to lazily emit the debug implementation. | ||||||||
| ▲ | Lvl999Noob 22 minutes ago | parent [-] | |||||||
You can do it at compile time. Or more likely, link time. If the implementation is ever actually used, it is kept in the binary. Otherwise it is used. The compiler can do the same, keeping all derives as just markers until it finds a place that actually uses it then firing off a background worker to compile the derive impl. | ||||||||
| ||||||||