by babel17 · 15y ago · 0 comments
>Yes you can. Check out my language Babel-17
I failed to see how purely functional structured programming address the need of identity for objects.
Could you elaborate a little more?
http://en.wikipedia.org/wiki/Identity_%28object-oriented_pro...
"identity is the basis for polymorphism in object-oriented programming."
In a purely functional object-oriented programming you don't need identity. But then that practice is almost indistinguishable from usual pure functional programming we have for at least 20 years with Haskell.
Besides, I don't see how you would need identity in the sense of being structurally-equal-but-not-the-same for class based polymorphism. You could perfectly do this without any side effect, despite what the `final` keyword in Java might mean.
By "identity" Wikipedia probably means something like "you think I'm a Foo, which is right, but underneath, I'm a special kind of Foo: a Bar. By the way, there are others special kinds of Foo: the Baz, the Fiz, the Buz…". In other words, subtyping is the basis for polymorphism in OOP.