Closed rafaqz closed 8 months ago
While I understand the purpose, in the spirit of simplicity I don't really like the idea of a groups
named tuple key. I think the person defining the interface can handle overlapping groups themselves, by concatenating named tuples.
OK I'm starting to see what you mean as I take a look at #27
Maybe if we had inheritance we could use that instead of groups?
As in, ArrayInterface
could inherit from ArrayModifyInterface
and ArrayQueryInterface
?
Yeah this comes from the Set
interface. And yes inheritance could really solve a bunch of this. I'll actually close this in favor of #33
Often optional components come in loose groups, like mutating functions
push!
,delete!
,empty!
would often all be implemented for a mutableAbstractSet
.it would be good to be able to specify this group with just
mutable
, and get the tests and traits for all its components.Nested NamedTuple is one simple way to do it - but it loses the posibility to have components in multiple overlapping groups. adding a
groups
object afteroptional
may be better design. It would be aNamedTuple
of tuples ofSymbol
.