Platonic Templates

As we all know, Plato argued that the objects we see in the world are just instantiations and specializations of abstract template classes. Any given chair is just an instance of the abstract class Chair. The existence of the abstract class is what permits us to identify the chair as a Chair. The very fact that we can talk about chairs, and that we can tell whether an object is a chair or not, means that Chair exists.

Plato also applied this to attributes and relations. For example, the fact that one chair is bigger than another is an instantiation of Bigger. I once questioned a philosophy professor about this. She pointed out that before there were any people, we still tend to think that one star was bigger than another. Therefore, the concept of Bigger must exist independently of people, and therefore it must really exist in some sort of abstract space.

I don’t really believe in any of this, myself. But it is true that we predisposed by nature to see certain types of objects (e.g., faces), and thus we are born with some sort of abstract concepts in our heads. (Plato (or Socrates) of course argued that pretty much everything we know we know from birth (in the Meno dialogue). I don’t believe that, but it seems to be true that we do know some things from birth.)

Anyhow, this is all background for this: does the fact that we naturally carry abstract concepts in our heads mean that object oriented programming is more natural than functional programming? That would be consonant with my earlier arguments about how parallel programming is somehow inimical to our thought processes.


Posted

in

by

Tags:

Comments

6 responses to “Platonic Templates”

  1. ncm Avatar

    Hmm.

    . (is-more-natural-than?
    . object-oriented-programming
    . functional-programming)

    vs.

    . object-oriented-programming is-more-natural-than:
    . functional-programming.

    Hard to say.

    Paul Graham had something to say about philosophers:

    . http://advogato.org/person/ncm/diary/229.html

    That we insist on seeing a candle flame as a thing even when we understand what’s really going on must mean something. Of course every…thing else differs from a candle flame only in that the nuclei stay put, more or less. The bits that we can actually touch, in any sense, are the electrons, and those stay put even less than the glowing air molecules in the flame. At this moment electrons that came off of every single object you touched today are wandering around inside you.

    What’s not a thing? Well, water. We say “a glass of water”; the glass is the thing, the water’s just there. I don’t know what to conclude from that.

    I do think that the sheer unnaturalness of functional programming accounts for much of its appeal. Likewise, mathematics.

  2. Ian Lance Taylor Avatar

    There is a difference between folk physics and real physics. Folk physics is what we instinctively believe to be true. Real physics is the reality. There are some interesting real effects we can easily see which defy folk physics; these make good science demonstrations. For example, siphons, or liquid nitrogen.

  3. ncm Avatar

    If we’re talking about what’s natural for people, we’re firmly on the side of “folk physics”. If your model insists on people *not* seeing candle flames as things, you lose them. You can make programming resemble maths, and lose almost everybody, or make it feel like nest-building, and get almost anybody.

    Your philosophy professor was completely wrong. “Bigger” is an idea we use in understanding the universe, present and past. The quarks and leptons that were following the fundamental laws had no experience of “bigger”. In what we insist were the bigger stars there were more other particles for them to interact with, but not so they would have noticed.

    I’m not sure how universal the idea of “bigger” is (i.e. is it always distinguished from “more”?) among naked primates, but I’m pretty sure “here” and “not here” qualify.

  4. Ian Lance Taylor Avatar

    In case it wasn’t clear, I agree that the professor was wrong.

  5. ncm Avatar

    It’s appalling that somebody so out of touch with 20th-century developments was in a position to mislead students. (It’s getting harder to be appalled these days, but I struggle manfully on.) But perhaps you meant to suggest that “bigger” is a concept natural enough to humans that even a philosophy professor (who, of anybody, should know better) insisted on seeing it as fundamental.

    Anyway, it would be hard to assess how much damage has been done by people presenting the craft of programming as a mathematical — i.e. profoundly unnatural — activity, rather than seeking to map it to activities that really are natural.

  6. Ian Lance Taylor Avatar

    I took a Philosophy of Mind course in college, and it took me a couple of years to figure out that the reason I did so poorly in the course was that I completely disagreed with the professor. Philosophy is hard. Unlike some other hard fields, it seems to be possible to reasonably successful without really knowing what you are doing.

Leave a Reply