Closed akprasad closed 1 year ago
I think we should do this. It's tedious, but it represents semantics better and has fewer gotchas long-term.
The right approach, I think, is to create PackedLinga
, PackedVibhakti
etc. which are variants that have the modular_bitfield
annotation. Then we can have a From
train that converts e.g. Linga
to PackedLinga
and vice-versa.
Although doing this makes the internal API much uglier, it cleans up the public API, which is a worthwhile tradeoff.
Completed in ede1e45
.
Option
is more idiomatic but might lead to a lot of friction for callers. We should experiment with it and see how it feels.