Closed Dekkonot closed 6 months ago
I hadn't actually checked what the maximum amount was since it felt like it's either 1 or like 5 for most classes.
It turns out it is 6. With that in mind, I think a Vec is fine and I'm also going to update the starting capacity to just be 6.
It's fairly common to need a list of superclasses for a class, so we should provide a method for it. This is an implementation.
It uses a
HashSet
for convenience. It's slightly more expensive than aVec
but provides an easy mechanism for checking if a class is in the returned set, so it feels worth it.