Runtime heterogeneous collections?

Neia Neutuladh neia at ikeran.org
Fri Jan 18 15:10:36 UTC 2019


On Fri, 18 Jan 2019 10:07:41 -0500, Steven Schveighoffer wrote:
> But what is the common interface between those 2 types? Even in
> Dcollections, where RedBlackTree came from, there was no interfaces that
> didn't specify the type they were dealing with. In other words, there is
> no common interface for sets of 2 different types.

.empty(), .clear(), .length(), and .toString(sink, formatspec). Which is 
kind of anemic. Might as well use Object.


More information about the Digitalmars-d-learn mailing list