This is to prove out the pattern.
Why not use dataclasses?
- dataclasses require a dependency for Python 3.6, but not for 3.7+, which complicates our packaging. There's surely a way around this, but could be a pain.
- dataclasses are mutable by default. Though that's not really a big deal because it's also easy to just set frozen=True.
- NamedTuples can be unpacked, dataclasses can not. Users probably shouldn't be unpacking our NamedTuples, but, if they are, we'd break them.
Why might we eventually want to move to dataclasses?
- NamedTuples and inheritance don't mix well. There are a bunch of places in the codebase where we try to get them to mix, which causes awkwardness.
If we want to switch to dataclasses in the future, it would not be difficult.
Depends on D5768.