3 ms·
> Whether you do Foo.Serialize() and it uses reflection to enumerate the properties, carries around tags permanently or it uses some compiletime generated funct
by gizmo 3y ago
> Whether you do Foo.Serialize() and it uses reflection to enumerate the properties, carries around tags permanently or it uses some compiletime generated function has nothing much to do with expressiveness.
Thinking those are the only options is exactly why the issue is expressiveness.
- pjc50 3y agoIs this a reference to some specific, better, technique or an optimistic belief that such a thing could be built if only ..?
- gizmo 3y agoCode generators are used because run-time introspection tends to be slow(er) and because debugging code generated at runtime is harder and because IDEs don't know how to deal with code generated at runtime. But there no reason why this should be so. No good reason to have a hard boundary between compiletime and runtime either. These are just historical artifacts.