Practical Foundations for Programming Languages

0 views
Skip to first unread message

Kevlin Henney

unread,
Aug 7, 2012, 11:51:17 AM8/7/12
to anatom...@googlegroups.com
An interesting comment in this blog on the forthcoming Practical Foundations for Programming Languages by Robert Harper:

It will come as no surprise that I give short shrift to conventional formulations of PL concepts, and avoid the computational cladistics that characterizes many texts in the area.  For example, it seems to me that the phrase “object-oriented” has little or no definite meaning (it is mostly an expression of approval), and I therefore find no use for it in PFPL (with the exception of the end notes).  This will come as a shock to many readers, since it is not at all in line with conventional wisdom, but so much the worse for conventional wisdom.

I have not had a chance to browse the PDF linked from the article, but it would be interesting to see the nature of the things that are defined and the distinctions that are (or are not) made in terms of other language concepts and models. This might help to highlight what is missing or unclear in the common perception of OO.

Kevlin




William Cook

unread,
Aug 7, 2012, 4:08:51 PM8/7/12
to anatom...@googlegroups.com
I have argued with Bob Harper in person and online for a while now.
He is very extreme in his negative opinion of OO, even though he doesn't really
understand it. Of course, he insists that he has the true understanding of all things
and that OO people are deluded and confused.

I had a long email
exchange with him, where he said lots of offensive things about OO and OO people.
I started posting them on my blog, but decided to take them down because it was
causing such a ruckus. His analysis of OO in his book is bad. It is meant to show
that OO is just a special case of certain kinds of functional programming, but it
does not do justice to the actual concept.� I'll be lucky not to get into a fist fight
next time I see him.

William

On 8/7/12 10:51 AM, Kevlin Henney wrote:
An interesting comment in this blog on the forthcoming Practical Foundations for Programming Languages�by Robert Harper:

It will come as no surprise that I give short shrift to conventional formulations of PL concepts, and avoid the computational cladistics that characterizes many texts in the area. �For example, it seems to me that the phrase �object-oriented� has little or no definite meaning (it is mostly an expression of approval), and I therefore find no use for it in PFPL (with the exception of the end notes). �This will come as a shock to many readers, since it is not at all in line with conventional wisdom, but so much the worse for conventional wisdom.

I have not had a chance to browse the PDF linked from the article, but it would be interesting to see the nature of the things that are defined and the distinctions that are (or are not) made in terms of other language concepts and models. This might help to highlight what is missing or unclear in the common perception of OO.

Kevlin




--
You received this message because you are subscribed to the Google Groups "Anatomy of Object-Oriented Programming" group.
To post to this group, send email to anatom...@googlegroups.com.
To unsubscribe from this group, send email to anatomy-of-O...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/anatomy-of-OO/-/qH1vf3Tm3-0J.
For more options, visit https://groups.google.com/groups/opt_out.
�
�

--
William Cook
Associate Professor, Computer Science
University of Texas at Austin

William Cook

unread,
Aug 7, 2012, 4:25:13 PM8/7/12
to anatom...@googlegroups.com
BTW: that last comment, about a fight, was a joke.� (in case that wasn't obvious)

James Noble

unread,
Aug 7, 2012, 6:48:24 PM8/7/12
to anatom...@googlegroups.com
On 8 Aug 2012, at 03:51, Kevlin Henney <kev...@curbralan.com> wrote:
Quoting Bob Harper:

> For example, it seems to me that the phrase “object-oriented” has little or no definite meaning (it is mostly an expression of approval

This reminds me of "My cat is object-oriented" - back from when? 1989?

That Bob Harper thinks that OO is bad is a defensible position,
with precedents back to Dijkstra and BASIC and COBOL.
That he thinks OO is not well defined is not.

I know William has been working on a new definition,
but to a first approximation I'm happy with the Peter Wegener's definition:

Object-Orientation = objects + classes + inheritance

James

Guarded Identity

unread,
Aug 7, 2012, 7:57:44 PM8/7/12
to anatomy-of-OO
Excerpts from James Noble's message of 2012-08-07 17:48:24 -0500:
>
> This reminds me of "My cat is object-oriented" - back from when? 1989?
>
> That Bob Harper thinks that OO is bad is a defensible position,
> with precedents back to Dijkstra and BASIC and COBOL.
> That he thinks OO is not well defined is not.

I'm not sure, because. . .

> I know William has been working on a new definition,
> but to a first approximation I'm happy with the Peter Wegener's definition:
>
> Object-Orientation = objects + classes + inheritance

. . . as you point out, there's just too many definitions floating around, and
they pull the discussion in different directions.

So I empathize with Bob Harper's position on both accounts. There is some
sloppy prior art with respect to object orientation. And the definition
somewhat twists in the wind.

To stop all the wind-twisting, I think there needs to be some drive to derive
more benefit/utility from the definition. From reading Bob's blog, I get the
sense that he's derived a lot of insights from studying abstractions completely
through type theory -- especially when bouncing between both sides of
Curry-Howard. So he's quick to dismiss a non-type-theoretic definition of
objects (is there one?).

If there were a formalization for William's much more compact definition of
objects that could lead to similar insights and understandings then I think
this kerfuffle may dissipate.

I believe William has expressed interest in keeping the discussion informal for
now, but I worry that there's only so far one can go with informality. These
informal discussions just go in circles.

From my cursory read of A Theory Of Objects, the formalizations there seem
lacking, but perhaps I should give it a second look. Everything else I've see
has been less about formalizing the essence of objects as phrased by William,
and more about encoding object-like behaviors in some other framework that
asserts its own spin/biases.

I want a definition that has a utility with respect to understanding
abstractions more deeply, so I don't want to over-special the definition.
Classes are unnecessary. Inheritance is unnecessary. We get down to the fact
that even a simple first class function is actually a degenerate object. This
is to me very insightful, because it seems very natural to ask "then is
/everything/ an object?" This leads to the answer that ADTs are not objects,
as per the "On Understanding" essay.

I'd just like to see if it's possible to explain all of this with some kind of
formalism.

-Sukant

Jan-Willem Maessen

unread,
Aug 8, 2012, 9:27:50 AM8/8/12
to anatom...@googlegroups.com
On Tue, Aug 7, 2012 at 7:57 PM, Guarded Identity <tnks....@gmail.com> wrote:
Excerpts from James Noble's message of 2012-08-07 17:48:24 -0500:
>
> This reminds me of "My cat is object-oriented" -  back from when? 1989?
>
> That Bob Harper thinks that OO is bad is a defensible position,
> with precedents back to Dijkstra and BASIC and COBOL.
> That he thinks OO is not well defined is not.

I'm not sure, because. . .

> I know William has been working on a new definition,
> but to a first approximation I'm happy with the Peter Wegener's definition:
>
> Object-Orientation = objects + classes + inheritance

. . . as you point out, there's just too many definitions floating around, and
they pull the discussion in different directions.

Be careful.  It is my experience that any so-called language paradigm ends up being broad and hard to pin down.  Consider functional programming – are variants of Lisp funcitonal programming languages?  They certainly fall under the umbrella of ICFP, the big functional programming conference (which grew in part out of the conference on "Lisp and Functional Programming").

Some folks want functional programming languages to be those that carefully treat the use of side effects.  At its extreme, that rules out most programming languages except Haskell!  Less extreme positions look at whether the language encourages and makes it easy to write side-effect-free code and confine imperativeness to places where it's absolutely needed.  This often ends up being an argument as much about libraries as about core language design and semantics.

Then there are people like Phil Wadler who point to definitions such as "Higher-Order, [statically] Typed" – but that, of course, includes many OO languages.  I'm thinking in particular of Ben Titzer's Virgil language, which is unambiguously OO in flavor (almost SmallTalk-y) but uses strong polymorphic types.  It makes a nice example because it doesn't come across as a "multiparadigm" language like Scala or OCaml.

My point here is that OO is neither more nor less well defined a concept than "procedural" programming or "functional" programming.  We have accepted a degree of ambiguity in these terms, as a field, that obliges us to describe what we *really* mean in any particular conversation.

That said, having a smaller number of agreed-upon definitions (even if they conflict) would probably be a good thing.  And I think it's also important to identify features of a programming language that *don't* fall under the heading of OO – either tests for Non-OO-ness, or (more common in my view) aspects of a language that simple don't make a difference one way or another.  Example: I'd put "support for lambdas" in the latter category for OO.  I'd put "absence of support for lambdas" as a key test of non-Functional-ness.

-Jan-Willem Maessen

-Jan-Willem Maessen

Kevlin Henney

unread,
Aug 8, 2012, 9:54:03 AM8/8/12
to anatom...@googlegroups.com
On 8 August 2012 14:27, Jan-Willem Maessen <jmae...@alum.mit.edu> wrote:
My point here is that OO is neither more nor less well defined a concept than "procedural" programming or "functional" programming.  We have accepted a degree of ambiguity in these terms, as a field, that obliges us to describe what we *really* mean in any particular conversation.

Indeed. Programming paradigms are not normalised and mutually exclusive, with crisply delimited boundaries between them. They are more like neighbourhoods that blur into one another, but for which we can normally find some inclusive and exclusive characteristics:
 
That said, having a smaller number of agreed-upon definitions (even if they conflict) would probably be a good thing.  And I think it's also important to identify features of a programming language that *don't* fall under the heading of OO – either tests for Non-OO-ness, or (more common in my view) aspects of a language that simple don't make a difference one way or another.  Example: I'd put "support for lambdas" in the latter category for OO.  I'd put "absence of support for lambdas" as a key test of non-Functional-ness.

Yes, this is a good example.

Kevlin
--
________________________

  Kevlin Henney
  +44 7801 073 508
  http://curbralan.com
  http://kevlin.tel
________________________

Cristina Videira Lopes

unread,
Aug 14, 2012, 8:18:13 PM8/14/12
to anatom...@googlegroups.com
Can anyone here point me to the earliest reference for the metaphor of
"programming as LEGO" that has been so intertwined with OOP?
I am pretty sure that it was the SIMULA people, but Google is not being
my friend on this...

Thanks
Crista

James Noble

unread,
Aug 14, 2012, 9:25:52 PM8/14/12
to anatom...@googlegroups.com, Robert Biddle β
Hah. I should know. I've given talks about this "the lego hypothesis"
I'd have to look but i can't think of an earliest reference

there was a CACM cover with lego on it.

Kevlin Henney

unread,
Aug 15, 2012, 2:39:31 AM8/15/12
to anatom...@googlegroups.com, Robert Biddle β
The CACM was a special issue on OO, IIRC, which would be the September 1990 issue.

Kevlin

James Noble

unread,
Aug 15, 2012, 4:45:27 AM8/15/12
to anatom...@googlegroups.com, Robert Biddle β
CACM was a special issue on OO, IIRC, which would be the September 1990 issue.

Kevlin Henney

unread,
Aug 15, 2012, 11:04:22 AM8/15/12
to anatom...@googlegroups.com, Robert Biddle β
On 15 August 2012 09:45, James Noble <k...@ecs.vuw.ac.nz> wrote:
CACM was a special issue on OO, IIRC, which would be the September 1990 issue.

well remembered Kevlin!

Spent a lot of time (and photocopying money) on that issue for my MSc at the time :^)

Kevlin
Reply all
Reply to author
Forward
0 new messages