4 ms·
Thanks! Yes, you're right that we can use a class here and instantiate an object of the class. I thought I would skip the intermediate step because all I care
by yawaramin 12y ago
Thanks!
Yes, you're right that we can use a class here and instantiate an object of the class. I thought I would skip the intermediate step because all I care about is the upcast type, MySet[A], and not the actual derived type.
But it's very much a matter of preference!