3 ms·
> Does it feel "brittle" to use Yes and no. No because when you try to do unsupported things like calling a method on an object which doesn’t support one, you
by Const-me 5y ago
> Does it feel "brittle" to use
Yes and no.
No because when you try to do unsupported things like calling a method on an object which doesn’t support one, you gonna get an appropriate runtime exception.
Yes because if you fail lower-level things like local parameter allocation, you gonna get an appropriate runtime exception but that one is (1) too late, I’d prefer such things to be detected when you emit the code, not when trying to use the generated code (2) Lacks the context.
Overall, when I can I’m using that higher-level System.Linq.Expressions for runtime codegen. Things are much nicer at that level. I only using the low-level thing when I need to emit new types, like there: https://github.com/Const-me/ComLightInterop/blob/master/ComLight/Emit/NativeDelegates.cs https://github.com/Const-me/ComLightInterop/blob/master/ComL...