It is obvious that nothing concrete can usually be calculated or compiled if the input types are still abstract or ‘just annotations’. This is surely something else that has to be considered for AOT but I guess it does not directly collide with the property of type stability. If you would have passed a concrete struct - or better a type-stable or typed struct - there would have been no problem for AOT compilation.
In the end, I do not want to start discussions about details here as I just wanted to give a suggestion of how doing efficient statical compilation safely may(!) be achieved in Julia with a minimal intrusion into the language. I hope I could at least share the essence of my idea with you. If you have too many reservations against it (as I have the impression
) then just throw this idea over board - no hard feelings on my side ![]()