by thesz · 15y ago · 0 comments
Oh, I don't know. I am not an expert in OO* at all.
All I know is that for something to be true OO it has to have objects with identities. I was told so. ;)
All I know about OO is Liskov substitution principle. Where it is unnecessary I tend to use State monad and immutable objects.
>subtyping is the basis for polymorphism in OOP.
Which can be solved by several means, interfaces and inheritance being two of them.
Well, you were told wrong things :-)
Alan Kay, who coined term "object-oriented" described object-oriented system as an assembly of objects communicating by message passing. Message passing requires identities (and state, except in severely reduced form).
Would you mind show me some code in pure functional language?
I mean, in Haskell or Clean. Those are pure enough.