> One cannot expect a compiler to come up with such encoding.

One could, however, imagine a sufficiently expressive language that allows the developer to specify the encoding schema without resorting to raw 64-bit words.

This breaks the language. Do you want safety or do you want expression?