Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Ancient Philosophy And Programming Languages

by cyocum (Curate)
on May 01, 2004 at 10:32 UTC ( #349593=perlmeditation: print w/ replies, xml ) Need Help??

This is a subject that I have long thought about but had yet to write about so I thought that this would be the right place to discuss this. I will warn you however that this might be a long ramble. So please get comfortable.

You may not have thought about it before but Classical Philosophy (Greek specifically) has much to say about the nature of programming languages. Two Greek writers stand out as the ones that I will talk about most today. The first is Plato who is probably one of the most famous philosophers ever. The other is his student Aristotle.

Plato in his Republic describes a notion called the "world of ideas". It goes something like this: everything in the universe has a corresponding abstract in the world of ideas. For instance, a table in the real world is just a reflection of the Table in the world of ideas. These abstracts continue to go up a hierarchy of types until you get to the ultimate type. In fact, this was a philosopher's job, according to Plato. It was the finding by dialectic of the ultimate type from which everything else derives.

If you are heavily into Object Oriented Programming. This may sound extremely familiar. In fact, I would suggest that the entire OOP paradigm is based upon Plato's "world of ideas". In Plato's famous "allegory of the cave", he describes the ultimate Object as goodness. Neo-Platonists in the second century AD would describe this ultimate Object as God. In OOP terms, this is the object from which everything else implicitly derives.

Which programming languages can be described as Platonic? I would argue that Java, Perl (because all objects derive from UNIVERSAL), and Smalltalk all fall under the Platonic description. They all have an ultimate Object from which all other objects derive. Java will pose a problem but I will return to that presently.

Now Plato's student Aristotle takes a completely different view of the universe. Rather than each object in the universe reflecting an Object in the "world of ideas", the universe is made up of descrete primative things called atoms. From these atoms, everything else in the universe is built. So for instance, to build a house, you must have all the atoms arranged in the right way to make wood. Then you have to arranged these "wood" objects into a house.

I would suggest that programming languages, which rely upon descrete primatives can be described as Aristotlean. Among these programming languages I would list: C and C++ (if there are any more which fit this description, please let me know). The reason for this is that both of these languages build larger abstractions based upon fundimental primatives such as int, float, char, etc. For instance, an array of chars makes a string rather than having a string object which represents a line of text (or many lines depending).

I understand that there may be some objections to these classifications. Like I alluded to above, Java has both an Aristotlean primitive system with int's, byte's, char's, etc. and a Platonic system based upon deriving from an ultimate base class. I would state that this has little effect since you can easily use objects to simulate the Platonic environment. Interestingly, with the addition of auto-boxing in Java 1.5, it will blur this distinction even further. (As an aside, I think that Smalltalk is the most "pure" Platonic system. Although, I do not have much experience with it.)

It is also interesting to note how Platonic programming systems almost inveriably have virtual machines to manage their environment. It seems that the only way to have a Platonic system is to have a completely separate universe pre-constructed for its sole use.

Hopefully, next time you think that a required course in Classical Philosophy has nothing to do with your computer science degree. Look very closely how Classical thought premiates the way in which you do the most modern of things, programming. I would heartily suggest that you read both Plato's Republic and Aristotles' Physics with an eye towards programming some time. It will greatly enhance your understanding of programming languages.

Comment on Ancient Philosophy And Programming Languages
Re: Ancient Philosophy And Programming Languages
by japhy (Canon) on May 01, 2004 at 14:23 UTC
    Very interesting. I'm curious (and I'm being serious) if you have any thoughts as to how philosophers might have distinguished or defined in general terms the concepts of functional, imperative, procedural, etc. languages.
    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

      This is an extremely good question. I had not given any thought to how they would distinguish between the different types of programming language. I tried to come up with a quick answer but I do not have one. I am going to think about this and try to write a follow-up node on this thread. I just wanted to get back to you so that you knew that I was not ignoring you. Thanks for this excellent question and I am sorry that I could not come up with anything right away.

        No rush. Philosophers didn't have all the answers right away either; they spent their time finding them.

        As a starting point for you (and other readers), I direct you to WikiPedia's entry on programming paradigms, which lists, among others: structured, imperative, procedural, functional, object-oriented, and event-driven.

        _____________________________________________________
        Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
        s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
      Yes, I think that non-imperative languages might be real Platonic things.

      I see these things like working with spreadsheet cells. You put formulas in them and then you get a result in the spreadsheet as a whole.

      .{\('v')/}
      _`(___)' __________________________

      Though this isn't classical philosophy, you might look at some of the modern "analytic" philosophers who have thought a lot about language itself. For Wittgenstein, for example, words don't have any intrinsic meaning, but are just ways of getting something done, provoking a certain kind of reaction. If you are in a place where you don't understand the langage, but you see people saying "I'll take a cheeseburger" and getting cheeseburgers, you don't have to understand the words, you just have to be able to make the sounds to get the results you want in that particular situation.

      You could compare this view of language (perhaps) to the "black box" in functional and OO programing. You don't need to know what a function "means", you just have to know when and how to use it to get the results you want.

Re: Ancient Philosophy And Programming Languages
by NodeReaper (Curate) on May 01, 2004 at 15:03 UTC
    This node was taken out by the NodeReaper on Sat May 1 20:35:19 2004 (EST)
    Reason: jdporter delete. junk.

    For more information on this node visit: this

Re: Ancient Philosophy And Programming Languages
by biosysadmin (Deacon) on May 01, 2004 at 17:27 UTC
    Cool meditation. My brain looks favorably upon ideas which merge concepts from different disciplines, such as molecular biology and computer science, evolution and algorithm development, or in this case philosophy and programming language design. This allows you to play interesting games with your mind by transferring concepts across disciplines and seeing how well they hold up. I think that the comparison Greek Philosophies goes very well.

    One minor criticism though: I believe that your "Aristotilian" should be spelled "Aristotelean," that's the way I've always seen it in my logic and history books.

    Good meditation though, I enjoyed reading it quite a bit.

      For what it's worth, Chambers gives "Aristotelian" or "Aristotelean".

      Hugo

Re: Ancient Philosophy And Programming Languages
by theon (Beadle) on May 01, 2004 at 18:00 UTC
    Looks like you're not talking about C++ but C only. C++ has a string type, and you can easily have everything as an Object (just like Java does for int -> Integer). I'd say C++ has some Aristotilian characteristics because of the C compatibility, but what was added (real C++, not C-style C++) is far more Platonic oriented. Imho not a good example to illustrate your (interesting, btw :)) discussion.

      The only reason that I added C++ to the list was because of its status as a super-set of C. This also illustrates the problem with Java nicely. Both C++ and Java have object structures but only Java requires an Object Oriented paradigm. C++ does not since it must support all of C. However, both languages have primitive data-types. I am still open to debate and discussion about how to seperate the types of languages.

        Well I think "types of languages" can not be strict, unless a language is crafted to follow one-and-only-one paradigm. If you have types of languages, some languages will perfectly fit one type, but others (particularly C++) may allow several paradigms, I wouldn't give them only one type.

        Then, think of such examples : a Java program using only static members (or singletons) vs a good POO C++ program. The former is closer to C-style modules than the latter. And there are examples of OO C programs (glib/gtk).

        It can be tricky. I think your categories apply to actual programs rather than languages. Then some languages are designed to provide one paradigm, so programs in this language will probably end up in only one of your categories, but not all of them (badly designed ones or other exceptions).

Re: Ancient Philosophy And Programming Languages
by weierophinney (Pilgrim) on May 01, 2004 at 18:44 UTC
    And what do we make of the fact that a language such as Perl is written in C...? That would suggest that a pure Platonic language cannot exist without an Arisotelian world to build from.

      I would reply like this and I may be wrong on this point. As long as the language is completely self-hosting, this should not be a problem. The language would be able to compile itself and avoid the whole problem. Now Perl may be a Platonic language run by an Arisotelian world because of its reliance on C.

Re: Ancient Philosophy And Programming Languages
by jdporter (Canon) on May 01, 2004 at 19:38 UTC

    I would disagree with your classification of C/C++ as Aristotlean. Int, char, etc. are still just types. The fact that they're intrinsic in the language is of no importance here. An Aristotlean language would be one which does not have abstract types, at least for its "object" system. Of such languages, Self is perhaps the best example. In Self, you don't create an object of type X by instantiating an abstract definition of class X, you clone the prototype of X, which is itself a concrete object.

    However, I would argue that no computer language is truly Aristotlean, because Aristotle's model does not (AFAIK) separate the representation from the behavior -- or, in procedural terms, the data from the code.

      Good point. That's actually the case for both philosophies. The major difference in ancient thought was that ideas already have their own independent existence in the world and that people "receive" them by getting in tune with the universe. The idea is identical to the thing.

      Modern thought involves an internalization of ideas to humans, producing a split between things and ideas. Ideas are the domain of thought and things are "in the world". This distinction is necessary to do OO, as far as I can tell. Programming is at least at the abstraction level of Enlightenment thought. :)

      --
      Damon Allen Davison
      http://www.allolex.net

        I disagree that the seperation between Mind and Body was an Enlightenment idea. I refer you to the beginning of discussion where Plato sets out his Theory of Forms (just hit the little blue arrow to get the rest of the discussion). He makes a clear distinction between what is thought and what is seen; in essence, between the Mind and the Body.

Re: Ancient Philosophy And Programming Languages
by etcshadow (Priest) on May 02, 2004 at 01:52 UTC
    BrainF*ck: very Aristotilean (by your definition).
    ------------ :Wq Not an editor command: Wq
Re: Ancient Philosophy And Programming Languages
by Jenda (Abbot) on May 03, 2004 at 14:45 UTC

    If you try hard enough, anything may resemble anything else. Which is IMHO exactly what you just did.

    Jenda
    Current philosophy is what you got left when all sciences separated out.

Aristotle the Atomist?
by BorgCopyeditor (Friar) on May 06, 2004 at 04:09 UTC
    While I wouldn't want to discourage the use of philosophy as a tool for meditating on the logical differences between programming languages, I can't help pointing out that there's a basic problem with your analogy: Aristotle (the ancient one, of course) was emphatically not an "atomist." He roundly criticized both Democritus and Leucippus.

    BCE
    --Your punctuation skills are insufficient!

      Aristotle (the ancient one, of course) was emphatically not an "atomist." He roundly criticized both Democritus and Leucippus.

      That is correct. Also, Aristotle more or less invented scientific taxonimy, like the system of phylla, genres, and species, which is probably closer to the true inspiration of the OO "description of the universe". From that standpoint, Aristotle would be "Platonic" too.

      I however think that this is really a great topic, because it seems obvious (and significant) that programming languages are subtly based on traditional Western logic and ontology.

Reaped: Re: Ancient Philosophy And Programming Languages
by NodeReaper (Curate) on May 25, 2011 at 13:22 UTC
        Please follow the work "Topics in Programming Languages, a Philosophical Analysis through the case of PROLOG".

        Please follow the work "Topics in Programming Languages, a Philosophical Analysis through the case of PROLOG"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://349593]
Approved by bart
Front-paged by bart
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-27 05:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls