It would be great if we can design load routines that are variant-based. That way, the user-side logic is more concise than knowing the exact type upfront. Similar for attribute reads (where we already support some flexible casts).