I'm now using Haxe to create shared logic for our Unity-based game, so I'm talking about C# target.
I'm pretty happy with the current results, not counting the nasty Float comparison bug (
https://github.com/HaxeFoundation/haxe/issues/2051), which took me some time to find. hope it will be fixed in a new Haxe release. For the time being, I copy-pasted Runtime.hx file from cs library and fixed it in my application.
Now to my main question. As far as I understood, when compiling Haxe to C# code, code generator finds usages of every field and creates an integer hash for it for fast field access and embeds it to the FieldLookup class. Which seems to be a nice optimization.
However I got a case where this gets in the way a bit: I tried to compile a DLL with basic Haxe runtime classes, with the intention of including this DLL in application, then compiling another DLL from Haxe-generated sources referencing that basic runtime DLL.
This way I could load Haxe-generated DLL (with game shared logic) with Assembly.Load and use classes without need for reflection (because all base classes, like HxObject, DynamicObject and Array are already there in the basic runtime DLL compiled in my application).
But unfortunately won't work, because Haxe-generated code relies heavily on the FieldLookup class and tries to find field name hashes in it. And because we use FieldLookup class from our basic runtime dll, it doesn't know anything about field names in the DLL assembly I am loading.
Probably there should be an option to generate field hashes for the code being compiled in some custom class and a method to merge them in FieldLookup at runtime if possible.