|
|
|
|
|
by catnaroek
3689 days ago
|
|
> I thought your solution didn't address FWIW, I didn't propose the original Scala snippet, so it isn't really “my” solution. > the original covariance/contravariance problem The problem is precisely preventing what you're trying to do, because it's unsafe. |
|
For this context, what I'm saying is that if you don't need to extract an apple from a list of fruits, then you can do it safely with inheritance, so whether using inheritance or delegation is irrelevant. Isn't it?