[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The world needs process-orientation

Quoting "Marc L. Smith" <mlsmith@xxxxxxxxx>:
> Every paradigm shift has been painful, and only partially successful.
> Sorry, I know better than to say "every," but the shift from goto's
> to structured programming was resisted, and we all know that
> structured programming wasn't a silver bullet for writing
> understandable, maintainable code. OOP, too, was resisted for a very
> long time, for all the reasons Neil mentions.

An excellent point. Sometimes it's informative to go back and read some of the
early articles pushing OO, and consider the uphill battle they faced at the
time. By the same token, many of the complaints about the dominance of OO made
in this thread sound startlingly similar to the complaints of functional
programming advocates in other forums.

> C++ was criticized by the OO community for not being pure OO

Quoth Alan Kay at OOPSLA'97: "..I made up the term object-oriented ? and I can
tell you I did not have C++ in mind..."

> One tragedy here is that what OO has become has deviated far from its
> original intent: concurrent objects interacting through message
> passing, and elimination of the assignment statement! In its original
> intent, I don't believe these concurrent objects differed from what
> we refer to as processes.

I recently read an interesting history of Smalltalk, where Alan Kay describes
his early conception of objects as being "little computers" that would
communicate with each other via messages. There was also a certain amount of
cross-fertilization of ideas between the early Smalltalk efforts and Carl
Hewitt's work on the Actor model. So yes, I think it'd be fair to say that the
original intent was to have concurrent objects. It's not clear to me where that
idea got lost.

> But more importantly, and I'll echo Peter here, we teach introductory CS
> all wrong, as students should see concurrency from the start -- it's
> natural! But we can't do this without textbooks...

I can think of at least one text that might fit the bill: van Roy and Haridi's
"Concepts, Techniques, and Models of Computer Programming". I know you're aware
of this book Marc (I recall discussing it with you at last year's PDPTA), but
for those who aren't familiar with it: CTM (as it's often referred to) is a
sort of modern replacement for the old Abelson and Sussman "wizard book"
(Structure and Interpretation of Computer Programs).

CTM uses the Oz language as its teaching tool, and weaves discussions of
concurrency throughout the book. It starts with a purely declarative core
language, then adds declarative (deterministic) concurrency, followed by
message-passing concurrency, explicit state, objects, shared state concurrency
(I think students need to know about it - they will face it in industry), and
ends with logic programming. All in one language. The discussion of
message-passing concurrency is framed in relative to the Erlang language, but
one could easily introduce CSP concepts at that point in a course too. I think
there's even an exercise that involves CSP.

Interestingly enough, the core semantics of Oz is defined in terms of a process
calculus (although it's not CSP).

Allan McInnes <amcinnes@xxxxxxxxxx>
PhD Candidate
Dept. of Electrical and Computer Engineering
Utah State University