Closed Majkl578 closed 5 years ago
My only concern with explicit void types is that they restrict the ability to create immutable structures that implement the base ones.
I generally disagree with this, you can't have a reliable interface for both mutable and immutable structure. Consumers of the interface wouldn't know how to handle the interface and whether it's mutable or not. If you want mutable and immutable structures side by side, it should come as two separate trees with only sharing read methods, not by inheritance hack that would break expectations for consumers.
My only concern with explicit void types is that they restrict the ability to create immutable structures that implement the base ones.
I generally disagree with this, you can't have a reliable interface for both mutable and immutable structure. Consumers of the interface wouldn't know how to handle the interface and whether it's mutable or not. If you want mutable and immutable structures side by side, it should come as two separate trees with only sharing read methods, not by inheritance hack that would break expectations for consumers.
Good call, agreed. :+1:
Add voids and document parameter/return types.