Skip to content

Comment on Why I'm Building a Database Engine in C#parent

Comments

What's fussy about AOT and reflection?

Only a subset of reflection is actually AoT safe, and you can run into issues like "the method you wanted to call wasn't statically referenced anywhere, so there is no compiled implementation of it".

That's due to trimming which can be also be enabled for self-contained builds that use JIT compilation. Trimming is mandatory for AOT though. But you can use annotations to prevent trimming of specific thing.

AOT doesn't support generating new executable code at runtime (Reflection.Emit), like you can do in JIT mode.

As the sibling comment says, it's an effect of trimming which you get even without AOT.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.