CMU “eliminating” object-oriented programming

March 28, 2011 at 10:27 am 23 comments

I talked to people about the new Carnegie Mellon University curriculum last week, but no one to whom I spoke made such a strong statement as below, that OO is being “eliminated entirely.”  I was pleased to hear that the new curriculum is multi-lingual and multi-paradigmatic.  I’m not sure how the curriculum can be entirely OO-free since the first course is in Python.  I know that the second course is in C0 (“C not”), and the third course is in ML. The report that the below blog post links to is much more careful in its claims about object-oriented programming. I did a Blog@CACM post, using the post below as an example, about how we polarize discussions in computing education rhetoric — the CMU report on the new curriculum is much more reasoned (in its analysis) and reasonable (in its recommendations).

Object-oriented programming is eliminated entirely from the introductory curriculum, because it is both anti-modular and anti-parallel by its very nature, and hence unsuitable for a modern CS curriculum.  A proposed new course on object-oriented design methodology will be offered at the sophomore level for those students who wish to study this topic.

via Teaching FP to freshmen « Existential Type.

Entry filed under: Uncategorized. Tags: , , .

Impact of CS on female non-majors: Beyond a pipeline model CE21 Advice: Go beyond your classroom

23 Comments Add your own

  • 1. Nick  |  March 28, 2011 at 10:41 am

    how is it “anti-modular and anti-parallel by its very nature” ? I need a little computing education I guess.

    Reply
  • 2. Alan Kay  |  March 28, 2011 at 11:08 am

    I fear this will wind up being embarrassing to both CMU and to the field itself.

    For example, if it isn’t modular and protected it isn’t object-oriented — so whatever they might be doing or thinking, it is probably more like ADTs with getters and setters and this is not OOP at all (even though it can be done in early real OOP languages, it has been known from the 70s that this isn’t a good idea).

    Similarly wrt to parallelism.

    Do they really think C++ and Java, etc., are real OOP languages?

    On the other hand, both real OOP and FP can be harmonized and improved by combining them along the lines of Lucid, McCarthy’s Situation Calculus, Linda. and PLANNER.

    I wish they would spend more time pondering and learning (but I guess this is old fashioned in universities these days?)

    Cheers,

    Alan

    Reply
  • 3. Bijan Parsia  |  March 28, 2011 at 12:16 pm

    I’m not sure how the curriculum can be entirely OO-free since the first course is in Python.

    Easily, eh? It’s pretty straightforward to write Python that is basically souped up, dynamic Pascal/Modula-2. It’s not trivial to use the included batteries, but perhaps that’s not what they’ll use it for. (See Williams’ book for an example of Python without UpFront Objects.)

    Alan, unless you coin a new term realOOP then it just isn’t correct to say that Java isn’t a “real” OOP language. Today, it is a central prototype of OOP.

    It seems like they’ll teach, roughly, imperative structured programming first (Python then C0), then more complex language paradigms. I think there’s an argument to be made there (c.f., Knuth).

    Reply
    • 4. Alan Kay  |  March 28, 2011 at 12:26 pm

      George Orwell understood that “colonizing” already existing terms and changing their meanings (even to their opposites) quite undermines progress in most ways.

      Reply
    • 5. Mark Guzdial  |  March 28, 2011 at 3:33 pm

      They’re teaching Python to control robots. That’s pretty hard to do without objects.

      Reply
      • 6. gasstationwithoutpumps  |  March 29, 2011 at 9:35 pm

        It is pretty easy to teach Python without teaching objects. The fact that many of the library pieces that students use are implemented and best thought of as objects does not require that objects be explicitly taught.

        “Object-oriented” is more a way of thinking about programs than it is a syntactic feature of a language. One can teach a programming language intended for object-oriented programmers without having students build or think much about objects. This is particularly possible with Python, which has a fine set of built-in objects (dicts and lists, for example) so that the language can be used as a powerful structured language without needing to be object oriented. In fact, when I have bioinformatics grad students learn Python, most don’t end up learning how to create new classes, though those who have had previous experience with some form of OOP usually do a little with them. Of course, they often end up trying to create complicated class hierarchies (like in java and C++) when all they need is a dict and a function.

        Reply
      • 7. Bijan Parsia  |  April 10, 2011 at 12:23 pm

        Prima facie that has to be wrong, yes? You can reasonably program robots without objects (e.g., little imperative scripts, or a simple event loop) and you can reasonably program in Python without objects (by design). (In the sense that your programs will not define classes or methods and you programs will be recognizable in structure to someone who learned from Oh! Pascal in the 1980s. Obviously, you are using python objects throughout.)

        So, where’s the difficulty?

        Reply
        • 8. Mark Guzdial  |  April 10, 2011 at 1:13 pm

          “Obviously, you are using Python objects throughout.” More than that, you can’t “call a method” on a robot — you send it a message. I argue that that’s closer to the original notion of object-oriented programming than the Java notion of object-oriented programming. Object-oriented programming isn’t defined by creating classes and defining public static void main.

          I suggest that this is how one promotes a better, older definition of a term — you point out the historical record, you emphasize the differences between common usage and the original definition, and you dispute the usage of the common definition. History isn’t dead, and certainly can be re-interpreted and re-influence the present,, and language isn’t dead, and can even be resurrected.

          Reply
          • 9. Bijan Parsia  |  April 10, 2011 at 1:44 pm

            “you can’t ‘call a method’ on a robot — you send it a message”

            If we are going to be crazy precise, it’s perfectly possible to program a robot’s behavior without any messages being sent. You write a program and burn it to rom and plug it in.

            That program may be encoded in an arbitrary programming language and an arbitrary paradigm. Method invocation, thus, obviously, can control robot behavior.

            I’m personally not clear that the “older” definition is better. “Object oriented” is not a term, itself, that lends itself to precision (“orientation” suggests loads of different ways and degrees). And do we really care about the term? Itself? It should be a mere means to an end. For me, the end isn’t idealogical or even promoting best practice: It’s being usefully clear about categories.

            In this discussion, isn’t the important thing the actual proposed content of the program? Either we can figure that out regardless of how they use their terminology or we can’t. It seems like we can, reasonably.

            Now, is what they are proposing a reasonable path or not? The empahsize on concurrency seems pretty interesting and the trying to avoid languages with too much syntactic cruft v. wise.

            Reply
            • 10. Mark Guzdial  |  April 10, 2011 at 2:23 pm

              You’re absolutely right that you can burn programs to ROMs. That’s not what they’re doing at CMU, though. They’re sending messages to robots.

              I don’t have any problem with what CMU is doing. I’m concerned about the rhetoric — that’s what I was complaining about in my post at Blog@CACM. I’m suggesting (parenthetical note in the post, more in these comments) that the Python with robots model may be object-oriented programming, despite the rhetoric. And if so, I think it’s closer to the original definition than the Java-induced current one. The point that I was trying to make with my last note (obviously, unsuccessfully) that it’s not a foregone conclusion that the term “object-oriented programming” is now fixed to be Java’s and not Smalltalk’s. Aren’t all terms up for definition and re-definition all the time? It depends on how we use them, and how we argue for their better use.

              Reply
          • 11. Bijan Parsia  |  April 10, 2011 at 4:17 pm

            Yes, all terms are up for redefinition and yes I understood that that’s what you’re proposing. I just don’t see why it’s interesting or helpful.

            I know any time that you get rantings about how some field isn’t a “real” science like physics, you are in lost plot land. Not dispositive, but worrying.

            If message passing is what we’re talking about, then let’s call it message passing, which seems more informative, qua term, anyway.

            If the new program uses Python modules which consist of nothing but top level defs plus some sort loop to process messages, then I don’t see it’s remotely helpful to call that OOP except to state, “Note that this sort of message passing apparently was part of the original conception of OOP…”

            Again, it seems like the interesting question is whether message passing based on top level defs programmed in a sorta Pascally structured programmy way is a good way to introduce programming or computational thinking.

            Reply
          • 12. Bijan Parsia  |  April 11, 2011 at 7:24 pm

            In this context, it’s fun to read or re-read
            Bjarne Stroustrup’s article Why C++ is not just an Object-Oriented Programming Language. Nice discussion about defining OOP (even if you don’t agree with his def).

            Reply
  • 13. Bijan Parsia  |  March 28, 2011 at 12:36 pm

    Oh piffle, Alan.

    This isn’t colonization, but language evolution. Language evolves over time, even technical language. I used to whine about the use of “ontology” in knowledge representation (or “knowledge” for that matter), but meh. If communication reasonably happens, then it’s just how the language is. Infelicitous terms happen.

    Let’s grapple with what they actually are doing and not so much with how they say what they are doing if the way they say it is normal for the general linguistic community in question.

    Reply
    • 14. Alan Kay  |  March 28, 2011 at 1:00 pm

      I think I agree with the piffle, but my point still stands.

      And if you say that “Java is an Object-oriented language”, then to adapt your very phrase, “communication isn’t reasonably happening”.

      More personally, why should the definer of a term and a design principle have to come up with another term because others have been both careless and opportunistic?

      Should such definers and designers have to change their CVs because of the errors of others?

      I really don’t think this discussion would be happening in a real field such as Physics.

      Reply
      • 15. Bijan Parsia  |  March 28, 2011 at 2:32 pm

        And if you say that “Java is an Object-oriented language”, then to adapt your very phrase, “communication isn’t reasonably happening”.

        Sure it is. I know what they meant. Most people in the area, I think, would know what they meant. If you said, “We’re not teaching OOP in CS1, but we’re using Java and classes and whatnot” most people would not understand you.

        More personally, why should the definer of a term and a design principle have to come up with another term because others have been both careless and opportunistic?

        In this case, you coined the term. Coiners of terms don’t own them (if the the terms gain any reasonable use). That just isn’t how language works.

        You can bemoan it which is fine, but it’s not going to be a particularly effective tactic in most cases. You could try to lobby for your preferred usage (though in this case, it’s pretty hopeless, I’d say), but that often detracts from more important issues. (GNU/Linux anyone?)

        Should you change your CV? Maybe? Depends on what you want to accomplish. Er…why would you need to change your CV? Which part? I’d rather you changed yours than trying to get a million people to change theirs from “6 yrs. OOP experience with Java” to “6 yrs Fake-OOP experience with Java”.

        I really don’t think this discussion would be happening in a real field such as Physics.

        You’re totally kidding, right? Dude, don’t go crank! 🙂

        I say this with all due respect and affection!

        In any case, this terminological debate is simply orthogonal to the content of the curricular shift. In point of fact, instead of teach any notion of class + method (with inheritance, polymorphism, etc.) in the first year, it looks (from my brief glance) to be focused on something much closer to traditional structured programming. Whether this is a good move is the question.

        Reply
        • 16. Erik Engbrecht  |  April 10, 2011 at 9:19 am

          Hijacking terms is a real problem. The horse has left the barn and is half way across the country on OOP. But the fact that people readily take terms that sound good, ignore all but the shallowest parts of their original meaning, and run with some self-serving definition is a major problem. It prevents any form of deep communication.

          A good recent example is the actor model. The actor model has a formal definition. None of the actor libraries and frameworks that I know of conform to the definition in more than superficial ways. The maintain the of a technology with formally grounded foundations while failing to comply with the axioms.

          Reply
          • 17. Bijan Parsia  |  April 10, 2011 at 10:15 am

            Hijacking terms is a real problem. The horse has left the barn and is half way across the country on OOP. But the fact that people readily take terms that sound good, ignore all but the shallowest parts of their original meaning, and run with some self-serving definition is a major problem. It prevents any form of deep communication.

            It’s, at worst, a minor problem and, within the vast sea of terminological issues floating around, a peccadillo most of the time.

            It’s worth fighting such battles some of the time, but even then carefully. They easily degenerate into prescriptivist nonsense. The current thread is a perfect example.

            Reply
      • 18. M Costa  |  April 10, 2011 at 3:40 am

        I really don’t think this discussion would be happening in
        a real field such as Physics.

        I fully understand what is meant here. Perhaps CS is too
        fresh to be real, it didn’t materialize yet, after all.
        We are still in the big bang era. Pity that such a lack of focus
        may hinder impact, and, eventually, reduce research funding on
        CS foundations.

        Reply
  • 19. Mark Miller  |  March 30, 2011 at 5:27 pm

    “Object-oriented programming is eliminated entirely from the introductory curriculum, because it is both anti-modular and anti-parallel by its very nature, and hence unsuitable for a modern CS curriculum.”

    When I read this I did a double-take, “What??” Alan already addressed the issue of modularity. Some OO implementations are parallel, others are not. An example of an OO system that is parallel in nature is Erlang. Whether OO should be taught at the introductory level is a subject I think for legitimate debate, and that’s not the part of Robert Harper’s statement with which I have a problem. Sure, he’s thinking of how the term is used in today’s vernacular, but that’s no excuse. It’d be like a college professor calling WWF “wrestling” as opposed to recognizing the distinction between the vernacular and the name for the real sport. Looking at the conversation above reminded me of a South Park episode from Season 13 that was a satire on this (WWF as “wrestling” vs. the real sport)…

    IMO what Harper said is intellectually lazy. A couple commenters to his blog got this, saying that there have been bad implementations of OO, but using them to define the concept is a fallacious argument.

    FP is becoming all the rage, because industry is looking for a way to get past the speed barrier that semiconductors have run up against. FP looks like an “answer” mostly because it hasn’t been debauched the way OO has, in its popular forms. The reason it hasn’t is CS relegated FP to AI for many years. OO got passed through the “low-pass filter” because it was useful for GUI programming in industry. It’s since been adapted to the web. I think Harper’s objective is in answer to what industry is calling for. It has been going to multiple cores for several years now, and so people with an engineering focus are looking for ways to use those cores while not making software incomprehensible in the process. FP is one such answer that holds some promise, but it is not the only answer. Just as OO is not good for everything, neither is FP. There’s more to computing to be discovered than FP, OO, and procedural models. It’d be nice if CS would stop being monomaniacal.

    Reply
  • […] for the change. I’m not here to argue about that – I think the comments on slashdot along with Mark Guzdial’s blog address a lot of the argument for one or the […]

    Reply
  • 21. eric  |  April 5, 2011 at 7:43 pm

    Go to your local book store and/or online book retailer and take a glance at all the titles that address topics such as testing OO systems, organizing OO systems, and decoupling OO systems. These books describe solutions to the modularity problem of OO design. If you would like to use a language paradigm that is more modular you could start using functional programming. Try Haskell for one. Functional programming is very modular . You don’t take my word for it, go learn this and see what you find. I warn you however that the rabbit hole is quite deep and addictive.

    That said, many of the ideas in today’s functional programming will become obsolete, outdated, or extended beyond all recognition. So I don’t think anyone should take offense to statements calling OOD what it is – “anti-modular” – since soon there will be some new criteria that today’s languages even FP fail to address.

    Reply
  • 22. Mark Guzdial  |  April 27, 2011 at 10:17 pm

    I would like to correct a point I made erroneously in the above: CMU is *not* using robots in their introductory course with Python. The quotes do seem to be correct, and I stand by my claim that we need to improve our rhetoric and explore a wide range of perspectives.

    Reply
  • […] CMU “eliminating” object-oriented programming (computinged.wordpress.com) […]

    Reply

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackback this post  |  Subscribe to the comments via RSS Feed


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 11.4K other subscribers

Feeds

Recent Posts

Blog Stats

  • 2,096,869 hits
March 2011
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

CS Teaching Tips