We use unions for packed messages at work (C/C++), so we can pass around a structure with a union as a data member, then access the correct path based on id field in the structure.
Worked fine until somebody wrote the structure to a file, now we are limited to the largest data used in the file, because even though there's a file version, nobody ever changed it....
So while useful for in-memory work, avoid blindly writing them to disk or network.