[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Oppinions on RCR for dup on immutable classes

Yukihiro Matsumoto

2/17/2007 4:24:00 PM

Hi,

In message "Re: Oppinions on RCR for dup on immutable classes"
on Sun, 18 Feb 2007 00:15:20 +0900, "Dean Wampler" <deanwampler@gmail.com> writes:

|For me, this does break the POLS, because it breaks the Liskov
|Substitution Principle (loosely, "an object of a derived type can be
|substituted for an object of a base type", for those of you who
|haven't heard of it...). LSP is essentially the underpinnings of
|Bertrand Meyer's "Design by Contract".

Please no POLS here. Considering whom you're trying to persuade, it's
no use.

As for LSP, if Object class has dup method and Fixnum the subclass of
Object does not have dup, doesn't it break the LSP? Fixnum no longer
has all the methods that Object has.

matz.