Slashdot Mirror


Philosophies and Programming Languages

evariste.galois writes "Wikipedia has a special section called, 'Language Philosophy,' in every article for a programming language. This section looks at the motivation and the basic principles of the language design. What if we investigate further than that? What deeper connections between philosophies and programming languages exist? By considering the most influential thinkers of all time (e.g. Plato, Descartes, Kant) we can figure out which programming language fits best with aspects of their philosophy (Did you know that Kant was the first Python programmer)? The list is not exhaustive, but this is a funny and educative start."

31 of 239 comments (clear)

  1. Codito by stoolpigeon · · Score: 4, Funny

    ergo sum

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    1. Re:Codito by pilgrim23 · · Score: 5, Funny

      I always thought it was sum ergo cogito..... but then I always was getting Descartes before de Horse

      --
      - Minutus cantorum, minutus balorum, minutus carborata descendum pantorum.
    2. Re:Codito by stoolpigeon · · Score: 4, Funny

      Once you figure out that you are, then the next question comes up.
       
      /(bb|[^b]{2})/

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
  2. Python by MyLongNickName · · Score: 5, Funny

    No wonder I Kant get anything done in Python!!!

    *looks around and sees no one laughing*
    *quietly backs off of the stage*

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
  3. Those who kan't... by jimbudncl · · Score: 5, Funny

    use Python.

  4. What's the Point? by Sponge+Bath · · Score: 5, Informative

    This read more like a 'If programming language X was a car then it would be a Y' type lists.
    Good for a brief chuckle, but not particularly enlightening.

    1. Re:What's the Point? by Java+Pimp · · Score: 4, Interesting
      Something like: If Programming Languages were <T>

      Guess we can add this one to the list.

      --
      Ascalante: Your bride is over 3,000 years old.
      Kull: She told me she was 19!
    2. Re:What's the Point? by Toonol · · Score: 4, Informative

      Yeah, 2300 years ago. Plato is irrelevant

      In the same sense that Galileo is irrelevant in modern physics. Irrelevant yet fundamentally important in the creation of the modern system of knowledge.

      Is it even possible to make a less significant statement?

      You just did. Any computer language that wasn't designed randomly has a philosophy behind it; there was some kind of principles behind the design. Flawed or elegant, there were choices about how to arrange abstract concepts.

  5. Philosophy and language by Slur · · Score: 4, Interesting

    Before we start this discussion, everyone should read the Tractatus Logico-philosophicus by Ludwig Wittgenstein. Programming languages, like human languages, express rules and patterns, but in philosophy we talk about how and when to employ rules, where to look for patterns. There are certainly general principles that apply to all programming languages, such as the trade-off between clarity and concision, whether it's better to own or reference an object in a given instance, etc. But does C++ really have a different "philosophy" than Objective-C, or are we just talking about the problem-solving intent and domain of the language and its suitability to a given problem? Do those really constitute philosophy, or are they just functional artifacts of the form?

    Discuss.

    --
    -- thinkyhead software and media
    1. Re:Philosophy and language by Estanislao+Mart�nez · · Score: 5, Interesting

      There are certainly general principles that apply to all programming languages, such as the trade-off between clarity and concision [...]

      I don't think you're really getting at what you mean here. How is the verbose "clear"? I understand you're trying to get at how most programmers find the more concise, expressive code much harder to understand, and seem to only be able to understand code when all of the operations are at very low level. So, for example, they claim that a map function is "unclear," while doing a loop that manually manages an array index counter is "clear." But that's simply not "clearer" in any sense; that's basically missing the forest for the trees.

      But does C++ really have a different "philosophy" than Objective-C, or are we just talking about the problem-solving intent and domain of the language and its suitability to a given problem?

      There are serious, philosophically interesting differences between some software paradigms, but if somebody's looking for them in C++ vs. Objective C, they're more likely trying to pick nits that don't exist. If you want a really big, real-world relevant set of philosophical issues that recurs over and over in software engineering, try the object-relational impedance mismatch. This comes down to two different types of ontology. To sum it up (badly!) in two bullet points:

      • Object-oriented modeling tacitly assumes an ontology where the world is made out of objects. Objects are treated as complexes of properties, divided into essentials and accidents.
      • Relational modeling assumes an ontology where the world is made out of facts (i.e., relations). Relational tables represent sets of facts that are assumed to hold; objects are just the values related by the facts. Taken to its logical conclusion, objects are atomic; all of their structure comes from which facts they occur in.

      And since you brought up Wittgenstein, note that the relational ontology is well, the first two sentences of the Tractatus:

      1. The world is all that is the case.

      1.1 The world is the totality of facts, not of things.

    2. Re:Philosophy and language by DrVomact · · Score: 4, Insightful

      Let's see...early or late Wittgenstein? The early Wittgenstein—the one who wrote the Tractatus—would have been a pure C programmer. Clarity, brevity, precision. The later Wittgenstein, the one we meet in Philosophical Investigations, programmed in Pascal. You know—the academic language which was completely cool, but never quite finished.

      As for Kant, he was definitely a Python guy. Only an obsessive-compulsive German would think that making a language indent-sensitive is a good thing.

      --
      Great men are almost always bad men--Lord Acton's Corollary
    3. Re:Philosophy and language by mckinnsb · · Score: 5, Insightful
      Mod parent up - he makes a few good points, which I would like to respond to here.

      I don't think you're really getting at what you mean here. How is the verbose "clear"? I understand you're trying to get at how most programmers find the more concise, expressive code much harder to understand, and seem to only be able to understand code when all of the operations are at very low level. So, for example, they claim that a map function is "unclear," while doing a loop that manually manages an array index counter is "clear." But that's simply not "clearer" in any sense; that's basically missing the forest for the trees.

      I feel that the most concise, expressive code is code which is part of rigorously defined, parsimonious model; hence what you mean by "missing the forest for the trees" - one code block/tree does not express succinctly the forest/design or the code block/tree's part in the forest/design. Expressive code does not exist of itself - it exists when it is part of a well designed model and everything around it makes sense. Like last Wednesday's XKCD comic stated in jest (but should be taken quite seriously) , "You will never find a programming language that relieves you of the burden of clarifying your ideas." In corollary, you will never find a way to write one block of code that will ever free you of that burden, either.

      There are serious, philosophically interesting differences between some software paradigms, but if somebody's looking for them in C++ vs. Objective C, they're more likely trying to pick nits that don't exist.

      Couldn't agree with you more here. Philosophy comes into play more when you start talking about design paradigms, and not the languages themselves. I would agree that certain languages lend themselves more to certain design paradigms, which would then reflect on Philosophy - but I still feel that this article, although lighthearted and undeserving of scrutiny, has got it backwards. You can certainly construct features of one language within another if you really *try*.

      As an aside - Socrates as an Assembly programmer? Seriously? That was the one choice I couldn't really let sit. I feel like he was chosen for that because he was the "first" philosopher, and some people view Assembly as the "first" programming language. Personally, I view Assembly more of a Alphabet than a Language (or to be a little more fair, more like Ancient Cuneiform than Latin), and if you were going to pick a philosopher to be a Assembly programmer, you should probably pick a Deconstructionist - Jacques Derrida would have been a good one.

    4. Re:Philosophy and language by Estanislao+Mart�nez · · Score: 4, Insightful

      In criticizing the philosophy of the Tractatus - specifically view of language as being bounded everywhere by rules - Wittgenstein thinks about languages as games, gains a valuable insight by comparing it to games like tennis. In tennis, there are rules for where you stand when serving, where you can and cannot hit the ball to have it count as a point, etc. But the game isn't bounded everywhere by rules - for example, how high can you hit the ball? So too with human language.

      I think you're missing the most important point about Wittgenstein's game analogies. It's part of a critique of the classical theory of categories, which assumes that categories have necessary and sufficient conditions for membership, that language terms stand for categories, and thus, insists that terms must have definitions in terms of necessary and sufficient conditions for the applicability of the term. Thus, the term "game" stands in need of a definition that tells us what are the properties that all games share.

      Wittgenstein tries to get us to see that there's no such definition to be had for "game"; as you try various candidate properties to see if they're shared by all games, you always find some game that doesn't have it. Games stand in a set of family resemblances to each other. But when you start following this idea through, you start to understand that Wittgenstein is inviting us to see instances of "language" in the same light as he's made us see the instances of games: language is a large complex of social practices that share family resemblances to each other.

      The other Wittgenstinian analogy that's relevant here is that language is like a toolbox. This fits in quite nicely with the family resemblance discussion, too: what is the property shared by all tools? To quote Wittgenstein's parody of the attempt to provide such a property:

      14. Imagine someone's saying: "All tools serve to modify something. Thus the hammer modifies the position of the nail, the saw the shape of the board, and so on."---And what is modified by the rule, the glue-pot, the nails?---"Our knowledge of things' length, the temperature of the glue, and the solidity of the box."-----Would anything be gained by this assimilation of expressions?---

      Also, Wittgenstein's treatment of rules is quite a bit more radical than you state it here, because it's framed as a critique of the notion of rule-following: the idea that rules "guide" the behavior of people. This is probably the part of Wittgenstein that's the most relevant to computer science, and in particular, to AI (classic AI fundamentally sees intelligence as rule-following). Alas, I haven't reviewed these parts in a while.

      Yes, I know this is specifically a topic about programming languages, something that the Tractatus deals with much better, being primarily about idealized languages for philosophical reasoning, but if you're going to start reading the man's work, you'd do yourself a favor by considering his earlier work in light of the critiques he presents in his later work.

      It's actually controversial to what extent Wittgenstein repudiated the Tractatus. More generally, the Tractatuts might well be the book that Wittgenstein's readers most disagree about. Wittgenstein always insisted that the philosophers who most admired the Tractatus completely missed the point behind it. There's certainly a shared theme between it an the Investigations: philosophy is a kind of confusion that comes up when philosophers fail to understand the limits of language. In the Investigations, the critique of philosophers' abuse of language takes the form of an attack on the classical theory of categories (the one that the idea of family resemblances is opposed to). In the Tractatus, on the other hand, the critique is based on the extremely obscure idea that there are things that language "shows" without "saying"--an idea that the book is (arguably) supposed to "show" rather than say...

  6. Philosophy of computer science by Anonymous Coward · · Score: 4, Informative

    The Stanford Encyclopedia of Philosophy, http://plato.stanford.edu/, has an introduction on philosophy of computer science which is far more interesting than this worthless drivel.

  7. Philosophy of Perl by nobodyman · · Score: 4, Funny

    Through my (admittedly limited) experience with updating another team's perl scripts, I've discovered the design philosophy of perl:

    • There is a God...
    • ...and he hates us

       

    1. Re:Philosophy of Perl by D+Ninja · · Score: 3, Funny

      I always thought Perl's philosophy was to make you think of it's creator (Larry Wall). How so, you ask? Well...developing in Perl is like pounding your head against a wall...

    2. Re:Philosophy of Perl by Lord+Ender · · Score: 5, Funny

      Perl is a lot like Christianity, actually. It borrows almost everything from previous languages, and it makes you hate yourself.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    3. Re:Philosophy of Perl by SanityInAnarchy · · Score: 3, Insightful

      I suspect it depends very much how clean that other team's perl is. Perl is perhaps the language in which it is easiest for sheer laziness to lead to something unreadable.

      However, Perl can be readable, and there are other reasons to like it.

      Disclaimer: I haven't touched Perl since I became a Ruby/Javascript convert.

      --
      Don't thank God, thank a doctor!
  8. Re:Nietzsche? by AndrewNeo · · Score: 4, Funny

    Schrodinger would like to disagree/agree with you.

  9. Finally! by cortesoft · · Score: 4, Interesting

    As a programmer who was a philosophy major in college I am so happy to finally see the connection made by others (even if at such a superficial and shallow level).

    In all seriousness, however, philosophy and programming are amazingly similar. They each are about breaking down complex thoughts into atomic, logical pieces. The origin of computer theory is in philosophy.

    And for all of you philosophy majors who are sick of being asked what you are going to do with a philosophy degree (as I was).... tell them you will be a computer programmer!

  10. CS and AI are grounded in philosophy by patlabor · · Score: 4, Informative

    Computer Science is already grounded in Philosophy, especially in Artificial Intelligence. Have a look at Defeasible Logic (based on defeasible reasoning) for some recent developments. If you want specific programming languages, have a look at Prolog. Search for theorem solvers online. Or check wikipedia for Logic programming http://en.wikipedia.org/wiki/Logic_programming. For that matter, have a look at the Turing machine http://en.wikipedia.org/wiki/Turing_machine. Bottom line, the field of Computer Science is based on logic.

  11. Re:which philosopher by Lord+Ender · · Score: 4, Funny

    Jack Handy.

    --
    A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
  12. Re:List is Wrong by Reality+Master+201 · · Score: 4, Interesting

    Lisp.

    Alternately a convoluted, confusing and maddening knot of junk, and a transcending work of crystalline insight, clarity and genius, and either way, constantly leaving you with the nagging feeling that if you'd just went through it one more time with love and care, you'd finally, truly get what it's all about.

  13. Machiavelli by rssrss · · Score: 3, Funny

    Machiavelli must have been the inspiration for Scheme.

    --
    In the land of the blind, the one-eyed man is king.
  14. Why the droids will win. by v(*_*)vvvv · · Score: 5, Insightful

    Programming languages are layers that abstract away the computer underneath. Philosophy is about pealing the layers that abstract away our being that lies underneath.

    Of course, we know everything about a computer, because we built it. Yet we know nothing about our being, even when we're all trapped in one.

    That could be our biggest weakness when the droids turn against us. Computers and machines will always know exactly what they are, while humans will forever be confused.

  15. Re:List is Wrong by gbjbaanb · · Score: 4, Funny

    I thought he was a real pissant who was rarely very stable.

  16. Pascal was strongly typed long before Java by maxwell+demon · · Score: 4, Informative

    From TFA:
    "Java was the first strongly-typed language, in which everything must have a type (or share a Form) before it is being used"

    The author obviously doesn't know Pascal. Not only does everything in Pascal have a type, and must be declared as such, Pascal doesn't even have the concept of a typecast. And much less implicit conversions than Java (the only way to get from a real to an integer is through a function like round or trunc). In Pascal, an array of 5 integers is a different type than an array of 6 integers (actually, you don't give a number, but a type for indexing, which may be an integer subrange type like 0..4, but might as well be e.g. an enumeration type).

    --
    The Tao of math: The numbers you can count are not the real numbers.
  17. Re:Isn't that ironic, don't ya think? by Brian+Gordon · · Score: 3, Insightful

    Yes there is. The author's saying assembly defines everything explicitly; it's higher level languages that "beg for a question" about where that came from or how that works. Following his logic assembly doesn't "beg for a question" at all, but rather the opposite.

  18. Alternative list by Kupfernigk · · Score: 3, Informative

    Socrates - ADA (he used his logical skills to help the aristocrats gain power, the real reason he was executed.)
    Plato - Java. (He believed in abstract objects but only had single inheritance)
    Aristotle - SQL (he tried to systematise and arrange everything)
    Aquinas - .NET languages. (Stuff pinched from everywhere and turned into an immense framework)
    Hegel - C++. (Hegel surely wrote the first write-only philosophical language)
    Descartes - Visual Basic (if you can make a picture of it, it must be right)
    Pascal - Prolog.
    Ada, Lady Lovelace - Lisp.
    Bertrand Russell - Erlang or Haskell
    Ludwig Wittgenstein - PL/1

    --
    From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
  19. If you're serious about the topic... by imidan · · Score: 3, Interesting

    If you're serious about the topic, someone above mentioned Wittgenstein. The Saphir-Worf hypothesis is basic reading for linguistics. Here is a paper called "Notation as a Tool of Thought" written by a guy called Kenneth Iverson that discusses the effect that computer languages have on expression of thought.

    Blithering about Kant being the first Python programmer and other such vacant nonsense may be entertaining in a limited way, but there are serious and fascinating issues in the study of linguistics, including those dealing with artificial language.

  20. Re:Leibniz, not Rousseau by earlymon · · Score: 3, Interesting

    True. I further congratulate you in advance for being the only person I've met who got or may have gotten exactly what was wrong with the rave literary reviews for Forest Gump - and if you read it and saw the movie, why the movie was superior in all of the ways that the book sucked donkey balls.

    Tien - I point out the event where Rousseau was overwhelmed with Voltaire, and frustrated by him, that he sent ruffians to beat him senseless in a dark alley, admonishing them to not do too much damage to Voltaire's head, as some good may yet come from it.

    And Rousseau did endlessly parrot the best of all possible worlds meme. Perhaps my classical education was erroneous, but I was taught that it was Rousseau's clever and beautiful defense of the best outcome of the Lisbon earthquake that finally drove Voltaire over the edge.

    Given those things and given that Leibniz would have been the better programmer, and given the many hundreds of thousands of lines of FORTRAN II and IV code I've seen - I still contend that the FORTRAN / FORTRAN IV programmer of prolific note is that monkey-see, monkey-do philosopher, Rousseau. Perhaps Leibniz did write a few dozen decent lines of it for him to proliferate...

    --
    Pathological kinda promises Path + Logical - but instead, you get stuck with pathetic.