[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: s-exprs + prototypes
Steven Shaw wrote:
> Luca Cardelli argues that "objects are more basic than procedures".
Cardelli also says the following in a related document, "A Theory of
Objects", available on the same page above:
"Object-oriented languages have tried to incorporate type abstraction,
polymorphism, and modularization all at once. As a result, OO languages are
(generally) a mess. Much effort has been dedicated to separating these
notions back again.
"Object-oriented languages have been plagued, more than any other kind of
languages, by confusion and unsoundness."
Other than these sorts of general statements, which I'm in full agreement
with, Cardelli's work is some distance from the discussion we've been
having. His claim that "objects are more basic" is based on the claim that
it's easier to implement functions with his object calculus, than it is to
implement *certain types* of objects with lambda calculi.
Cardelli doesn't give enough detail in those slides to really evaluate these
claims; I'd be curious if anyone knows more. Afaict, at least part of his
point relates to something we've already discussed, which is the greater
amount of machinery present in an OO system. This can be seen in the object
calculus he presents, and this additional machinery is exactly what I'm
suggesting can be a drawback.
Another important point is that an OO system based on Cardelli's calculus
might be quite pleasant - I haven't really examined his language, Obliq.
But afaik, we haven't been talking here about languages founded on object
calculi. The distance between existing object languages and Cardelli's
object calculus is far greater than that between functional languages and
lambda calculus. Functional languages tend to be quite faithful expressions
and extensions of the underlying calculus, whereas current object languages
are not based on any such formal model.
Cardelli and Abadi's work in these areas seems too new to have had an impact
on real languages yet. If and when it does, object languages will become
more formally sound, addressing some of the concerns quoted above.