Runtime heterogeneous collections?

Alex sascha.orlov at gmail.com
Fri Jan 18 15:24:46 UTC 2019


On Friday, 18 January 2019 at 15:07:41 UTC, Steven Schveighoffer 
wrote:
> On 1/18/19 9:58 AM, Alex wrote:
>> On Friday, 18 January 2019 at 13:31:28 UTC, Steven 
>> Schveighoffer wrote:
>>>[...]
>> 
>> In this case, I would say Phobos lacks an appropriate 
>> interface definition, what do you think?
>
> 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.
>
> -Steve

Aha... I see... all important methods are templated on the 
element type... hmm.


More information about the Digitalmars-d-learn mailing list