Re: LSP

Shelby <[email protected]>
Newsgroups gmane.comp.lang.scala
Message-ID <[email protected]>
On Friday, June 19, 2015 at 2:37:49 AM UTC+8, Bardur Arantsson wrote:

> Uh, see the formal definition with is slightly below on the same 
> Wikipedia page. 
>
> And yes, it's very hard to *not* violate that rule. Hence "prefer 
> composition over inheritance" and such guidelines. 
>

Seems it is easy to not violate is for covariant List[T] for as long as the 
types in T don't use inheritance. Well I am not really making a point am I. 
Because being covariant on its type parameter is not inheritance. 

So I am making the point that we still need subtyping, but not subclassing.

I elaborated that point in the other thread.

-- 
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.