Just for reference, if you can subtype all your structs from a single abstract type, then you can use Macro to write function with many conditionals - #8 by Skoffer to make union splitting irrelevant of the number of types you define.
1 Like