Actually, wouldn't streams be an example of good Liskoviness? If there was a readonly stream base class, and a readwrite subclass, //that// would violate the immutability implied by a reference to a readonly stream. Having canwrite==false on the other hand means you're using a type which may have writable implementation.
-- Louis DeJardin - sent from a mobile From: Aeden Jameson Sent: Friday, March 11, 2011 10:04 AM To: [email protected] Subject: Re: Your Favorite Liskov Violations Examples in .NET Hi Kelly, I'm not all that familiar with the streams library. Would you mind providing a specific example. On Wed, Mar 9, 2011 at 6:31 PM, Kelly Leahy <[email protected]> wrote: > The entire way that streams work is an lsp violation, with read/canread.... > > On Mar 10, 2011 2:29 AM, "Chris Bilson" <[email protected]> wrote: >> Favorite? I would't say I like it, but this is the classic: >> >> ICollection<string> a = new [] { "go ahead and try to add >> something...after >> all, I implement ICollection<>" ]; >> a.Add("ha ha!"); >> >> --c >> >> >> On Wed, Mar 9, 2011 at 16:46, Aeden Jameson <[email protected]> >> wrote: >> >>> What are your favorite examples of violations of Liskov in the .NET >>> framework? >>> >>> -- >>> Cheers, >>> Aeden >>> >>> Blog : http://aedenjameson.blogspot.com/ >>> Linked In: http://www.linkedin.com/in/aedenjameson >>> Blah Blah Blah: http://www.twitter.com/daliful >>> Facebook : http://www.facebook.com/aeden.jameson >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Seattle area Alt.Net" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/altnetseattle?hl=en. >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Seattle area Alt.Net" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/altnetseattle?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Seattle area Alt.Net" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/altnetseattle?hl=en. > -- Cheers, Aeden Blog : http://aedenjameson.blogspot.com/ Linked In: http://www.linkedin.com/in/aedenjameson Blah Blah Blah: http://www.twitter.com/daliful Facebook : http://www.facebook.com/aeden.jameson -- You received this message because you are subscribed to the Google Groups "Seattle area Alt.Net" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/altnetseattle?hl=en. -- You received this message because you are subscribed to the Google Groups "Seattle area Alt.Net" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/altnetseattle?hl=en.
