Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Image

Philosophies and Programming Languages 239

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."

*

This discussion has been archived. No new comments can be posted.

Philosophies and Programming Languages

Comments Filter:
  • Codito (Score:4, Funny)

    by stoolpigeon ( 454276 ) * <bittercode@gmail> on Friday April 17, 2009 @12:14PM (#27614921) Homepage Journal

    ergo sum

  • Python (Score:5, Funny)

    by MyLongNickName ( 822545 ) on Friday April 17, 2009 @12:14PM (#27614923) Journal

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

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

  • Sorry, Kant was never a python programmer. Impossible. My personal guess is that Kant was programming in Modula, but it could also have been Brainf**ck. Any other suggestions by people who have actually read Cunt?
    • Re:List is Wrong (Score:5, Interesting)

      by Reality Master 201 ( 578873 ) on Friday April 17, 2009 @12:51PM (#27615723) Journal

      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.

      • I heard of a student learning an early version of LISP and entered the following line...

        True = false

        He was interrupted, forgot about it, saved and then the fun began! I don't know if the story is correct but the thought is humorous.

        • Re: (Score:3, Informative)

          Oddly enough, what you write has no relationship, linguistic or otherwise, to Lisp where, even if there were bindings of the symbols true and false in some context, they still would not equate to the constants T and NIL, whose values cannot be changed.

          Now setting the value of nil in Smalltalk to something else - that's good times.

    • by gbjbaanb ( 229885 ) on Friday April 17, 2009 @01:31PM (#27616601)

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

    • by Duhavid ( 677874 )

      Why are you bringing composers into this?

  • by jimbudncl ( 1263912 ) on Friday April 17, 2009 @12:17PM (#27614985)
    use Python. </flamebait>
  • What's the Point? (Score:5, Informative)

    by Sponge Bath ( 413667 ) on Friday April 17, 2009 @12:17PM (#27614991)

    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.

    • Re:What's the Point? (Score:5, Interesting)

      by Java Pimp ( 98454 ) on Friday April 17, 2009 @12:43PM (#27615565) Homepage
      Something like: If Programming Languages were <T> [lambda-the-ultimate.org]

      Guess we can add this one to the list.

    • Yeah... the past discussed article about languages and religions ( http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html [aegisub.net] ) was more comprehensive and insightful.

    • Good for a brief facepalm if anything.

      Plato is huge figure in philosophy

      Yeah, 2300 years ago. Plato is irrelevant.

      Wikipedia has a special section called, 'Language Philosophy,' in every article for a programming language.

      Is it even possible to make a less significant statement?

      • Re:What's the Point? (Score:5, Informative)

        by Toonol ( 1057698 ) on Friday April 17, 2009 @02:06PM (#27617251)
        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.
      • Re: (Score:3, Interesting)

        by SL Baur ( 19540 )

        Wikipedia has a special section called, 'Language Philosophy,' in every article for a programming language.

        Is it even possible to make a less significant statement?

        You must be new here.

        A goatse link.
        I, for one, welcome our Philosophic Programming Overlords.

        To name three.

        The article wasn't factually correct. This

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

        isn't even close. Sigh. By that definition FORTRAN counts. Every variable DOES have a type "before being used". It's a floating point type if the variable name starts with A-H, O-Z and integer otherwise. Perhaps the author is confused about static typing. In which case he's still off by a couple of decades on which was language was first to be "strongly-

    • If programming language X was a car then it would be a Y

      ...where "Y" is "head of a list", according to Wittgenstein.

  • In a similar manner, everything in Assembly begs for a question.

    That's not what that means! In fact, the point being made is antithetical to begging the question!

  • by Slur ( 61510 ) on Friday April 17, 2009 @12:19PM (#27615051) Homepage Journal

    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.

    • Re: (Score:2, Interesting)

      All I know is some computer languages have the philosophy of "job security". Examples: Perl and .... um, yeah....
    • by Estanislao Martínez ( 203477 ) on Friday April 17, 2009 @12:54PM (#27615775) Homepage

      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 [wikipedia.org]. 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.

      • Re: (Score:3, Interesting)

        by Eivind ( 15695 )
        The verbose isn't -automatically- clear, and the concise isn't automatically unclear. Indeed, like most things in life, the middle way is often the best one, being horribly verbose makes it a lot of work to even readd what the code says, much less understand it, whereas being -overly- compact has a tendency to make things unreadable.
      • by mckinnsb ( 984522 ) on Friday April 17, 2009 @02:03PM (#27617185)
        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.

      • Re: (Score:2, Insightful)

        by 0xdeadbeef ( 28836 )

        To really sum it up: Is the world made of sets or is it made of graphs?

        • To really sum it up: Is the world made of sets or is it made of graphs?

          No, that's really just two different versions of "the world is made of facts, not things." Set theory doesn't rely on objects having essential properties; the only thing set theory assumes of the set members is that there is an identity relation on them. (Though of course, as we both know, sets really are graphs!)

      • I don't think you're really getting at what you mean here. How is the verbose "clear"?

        Noting that there is a trade-off between concision and clarity does not mean that verbosity is clear, it means that there are situations when the most concise expression may not be the most clear. It is perfectly consistent with the observation that the most concise expression may at times also be the most clear, and that being more verbose may not always add clarity.

        I understand you're trying to get at how most programme

    • >>Tractatus Logico-philosophicus by Ludwig Wittgenstein

      I've read it.

      While he considered himself brilliant, if he can't even bother to define or defend his own terms and statements, it has no value.

      • While he considered himself brilliant, if he can't even bother to define or defend his own terms and statements, it has no value.

        If that's your reaction to the Tractatus, then you clearly didn't read it very carefully or understand it very well.

        • >>If that's your reaction to the Tractatus, then you clearly didn't read it very carefully or understand it very well.

          Writing obtusely doesn't make one intelligent.

          Which is ironic, since he considered all philosophical problems just problems with clarity of language, with the job of the philosopher akin to that of a linguistic janitor, cleaning up definitions.

    • by DrVomact ( 726065 ) on Friday April 17, 2009 @01:58PM (#27617073) Journal

      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.

    • The pointers vs. references debate is like having sexual words vs. using innuendo (e.g. "masturbate" vs. "play with oneself").

  • by Anonymous Coward on Friday April 17, 2009 @12:20PM (#27615069)

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

  • the first virus/ worm/ trojan author?

    • by mc1138 ( 718275 )
      Anti-Virus is Dead.
    • Re: (Score:3, Insightful)

      by TheCycoONE ( 913189 )

      I doubt it, Nietzsche rejected artificial morality and the distinction between good and evil. As a language he would be type-less and purposefully unlike conventional languages. I'm thinking LISP, but perhaps someone more familiar with his works can express a better choice.

      • I'm tempted to say lolcode.

      • nihilism is purposeless and random. coding therefore cannot have anything to do with nietzsche, since it is all structure

        • Re: (Score:3, Informative)

          by johnsonav ( 1098915 )

          nihilism is purposeless and random. coding therefore cannot have anything to do with nietzsche, since it is all structure

          That's all well and good. But, Nietzsche wasn't a nihilist. In fact, he wrote extensively in opposition to it. While both Nietzsche and the nihilists agreed on the illegitimacy of the existing moral order, Nietzsche wanted to replace it with something new, while nihilists insist that no such thing is possible.

          • prattling on about a superman does not count, its too vague and humorously deific when god is supposed to be dead

            it does no good to overthrow an existing order without properly articulating a new one

            otherwise, your effect is nihilism, whether actively espouse that philosophy or not

            • Re: (Score:3, Insightful)

              by johnsonav ( 1098915 )

              prattling on about a superman does not count [...]

              Why... Because you say so?

              it does no good to overthrow an existing order without properly articulating a new one

              otherwise, your effect is nihilism, whether actively espouse that philosophy or not

              He did articulate a new one. Whether you agree with it or not--or even find it silly--does not change the fact that Nietzsche was offering an alternative; an alternative that a nihilist, by definition, is not.

              • and replaced with waffles

                if you belittle my philosophy in any way, its just because "you say so", not because you have any valid logical reason to object

                whu?! howabout i have a valid coherent logical reason to object that i can articulate in logical reasonable terms. fair enough?

                ok: defining what a "superman" is in logically coherent terms as expansive as the moral system it is supposed to replace would have value

                otherwise, what nietzsche is doing is what every teenager does: destroy his faith in his societ

      • by Jonner ( 189691 )

        If you're right about Nietzsche, perhaps FORTH [wikipedia.org] would make more sense. Lisps are dynamically typed, but FORTH is truly typeless and much less conventional.

  • by nobodyman ( 90587 ) on Friday April 17, 2009 @12:25PM (#27615181) Homepage

    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

       

  • would be PHP then?

  • Finally! (Score:5, Interesting)

    by cortesoft ( 1150075 ) on Friday April 17, 2009 @12:32PM (#27615343)

    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!

  • . . . COBOL, FORTRAN and APL are still up for grabs.

    I'm really stumped about who to pick for the Occam programming language.

  • Struth!

  • by patlabor ( 56309 ) on Friday April 17, 2009 @12:38PM (#27615481)

    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 [wikipedia.org]. For that matter, have a look at the Turing machine http://en.wikipedia.org/wiki/Turing_machine [wikipedia.org]. Bottom line, the field of Computer Science is based on logic.

  • Nope, sorry, we can't do that because of [[WP:OR]]. -~~~~
  • I'm not sure educative is a word. Probably looking for pedagogical.
    • Re: (Score:3, Informative)

      by langelgjm ( 860756 )

      It is a word: educative. [merriam-webster.com]

      I'd quote the OED as well, but I'm too lazy to start up my VPN and interrupt the torrents.

      Besides, pedagogical would have more to do with the method of teaching. "Educational" would probably have been the best choice.

    • by JustOK ( 667959 )

      It's a perfectly cromulant [reference.com] word.

  • Does this mean Nietzsche would have worked for Netcraft?

    "This just in--COBOL is dead. Netcraft confirms it."

    And in a slightly more serious vein, discussion of philosophy of language design is all well and good. At the very least it's the kind of masturbation one can do with the whole family. Kantian compilers and Platonic preprocessors are certainly titillating. But what I'd be more interested in is if there have been any studies of programming languages in terms of human language. I know you can make

  • Informational Realism [soulphysics.org] is worth investigating as a basis for programming languages.

    This is a lineage that goes back to at least Principia Mathematica's attempt to derive "relation arithmetic" as a way of orienting our descriptions of the world around relations rather than around objects.

  • I've saved this classic text for years and years. Not only was it the first serious programming language I ever took up, but the imaginary programmer addressed throughout the text was a female--like me. I loved it. Did that fact have anything to do with the philosophy of the developers of the language? Probably not, but it somehow spoke volumes about the people I knew who coded in it. (Back when the Earth was still cooling...)

    • I read that book also and you certainly brought back memories. The author struck a good balance in making an otherwise dry subject, interesting and at times even funny. I remember a paragraph about the importance of choosing meaningful variable names. In it, the author presented the "Who's on first" routine by Abbot and Costello.

  • by rssrss ( 686344 ) on Friday April 17, 2009 @12:53PM (#27615749)

    Machiavelli must have been the inspiration for Scheme.

  • by xee ( 128376 ) on Friday April 17, 2009 @01:00PM (#27615899) Journal

    The pythagoreans identify nicely with Mathematica.

  • "There are more things in Heaven and Earth, Horatio, than are dreamt of in your philosophies."
    - Shakespeare (Hamlet)
  • by v(*_*)vvvv ( 233078 ) on Friday April 17, 2009 @01:20PM (#27616381)

    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.

  • by maxwell demon ( 590494 ) on Friday April 17, 2009 @01:47PM (#27616865) Journal

    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).

  • FORTRAN (Score:3, Insightful)

    by earlymon ( 1116185 ) on Friday April 17, 2009 @02:25PM (#27617605) Homepage Journal

    All FORTRANs up to and including FORTRAN IV WATFIV were concordant with their best-known programmer, Rousseau - it was, after all, the best of all possible worlds.

    Voltaire pointed out the mind-numbing ridiculousness of that idea, salvaged what was the real essence, and formulated a framework of thought that influenced all others. His philosophy was direct, compact and completely elegant. Naturally, Voltaire is best read not in translated English, but in its original FORTRAN 77 form.

    • Voltaire's Professor Pangloss was based on Leibniz, not Rousseau. Leibniz would probably have been a better programmer anyway.

      • by earlymon ( 1116185 ) on Friday April 17, 2009 @04:15PM (#27619279) Homepage Journal

        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...

  • Alternative list (Score:4, Informative)

    by Kupfernigk ( 1190345 ) on Friday April 17, 2009 @02:34PM (#27617735)
    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
  • Wouldn't Kant have used a subject oriented language?

  • by imidan ( 559239 ) on Friday April 17, 2009 @03:03PM (#27618239)

    If you're serious about the topic, someone above mentioned Wittgenstein. The Saphir-Worf hypothesis is basic reading for linguistics. Here [acm.org] 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.

  • Descartes would be the perfect Java guru. Java was the first strongly-typed language...

    Wtf is this guy smoking? ML had a provably sound parametric type system in the late 1970s!

    • Wtf is this guy smoking? ML had a provably sound parametric type system in the late 1970s!

      Odd that you don't find it obvious - he's smoking a little thing called youth. From what little I remember, it was pretty good shit!

  • Nihilism [wikipedia.org] and Absurdism [wikipedia.org]. At least I can't find any meaning or value in PHP. Kierkegaard and Nietzsche would probably agree.

It is easier to write an incorrect program than understand a correct one.

Working...