Become a fan of Slashdot on Facebook

 



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

  • by Samschnooks ( 1415697 ) on Friday April 17, 2009 @12:26PM (#27615207)
    All I know is some computer languages have the philosophy of "job security". Examples: Perl and .... um, yeah....
  • 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!

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

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

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

  • by Eivind ( 15695 ) <eivindorama@gmail.com> on Friday April 17, 2009 @01:17PM (#27616327) Homepage
    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 Estanislao Martínez ( 203477 ) on Friday April 17, 2009 @02:02PM (#27617165) Homepage

    I don't think the object-relational impedance mismatch is really fitting to expose the philosophical differences between programming languages, since the one describes behaviour and local subspace of the system state space while the other views the system as a consistent whole, being an end-state of the various local processes.

    But what I meant to single out is not programming languages, but rather, data modeling; i.e., the use of computer programs to reason about the world.

    However, I still think that there's a programming language philosophical difference of the sort you're interested in here, though not between OOP/relational, but rather, between imperative/functional (or more generally, imperative/declarative). Functional in this regard sounds very much like your characterization of the relational model right there--but I'd need to better unpack the very succinct point you're making here before I could comment more intelligently.

  • Re:Codito (Score:3, Interesting)

    by Bob-o-Matic! ( 620698 ) <(robert.peters) (at) (gmail.com)> on Friday April 17, 2009 @02:04PM (#27617205) Homepage

    555

    (a Thai joke)

    I was a language instructor as a SSgt in the USAF at the defense language institute Korean school in Monterey, CA. One of my students, an Army Special Forces SFC with Thai language experience (I have none), was participating in a creative role play involving numbers and vocabulary commonly used with numbers.

    He put on his army trench coat (class b uniform day) stood in front of the class, and proceeded to act like a guy who sells watches on the street. His sales pitch (for a tv commercial, I guess) went fairly well until he started to give his 555-nnnn phone number in Thai rather than Korean.

    The other students an I who had been concentrating keenly to figure out just what the hell the student SFC had been saying were totally taken by surprise by what we heard and a good laugh was had by all. The SFC was clearly working hard to communicate his free-form message (compared to many other lessons which concentrate on formatted language transactions such as greetings, weather reports, etc.), and it was quite a scene when he slipped into another language.

    Good times.

  • by colinrichardday ( 768814 ) <colin.day.6@hotmail.com> on Friday April 17, 2009 @02:59PM (#27618169)

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

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

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

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

    by SL Baur ( 19540 ) <steve@xemacs.org> on Saturday April 18, 2009 @01:25AM (#27623931) Homepage Journal

    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-typed". If you want to restrict it to widely used languages, Ada or Pascal (which was never meant to be anything other than an academic teaching language) would qualify. Fringe languages that influenced Ada like Modula and Modula II are possible too.

    Actually, the only untyped language I'm aware of is "B", which used a machine word as its basic "type". Maybe BCPL counts too, but other than reading that it as an ancestor to C, I don't know much else about it.

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

    by Anonymous Coward on Saturday April 18, 2009 @03:27AM (#27624425)

    Comparing programming languages to philosophy makes quite some sense in is not just for chuckles. Both are about describing or modeling a universe. This leads us to interesting similarities, for example:

    Plato and class instantiation: Plato thought that everything existed as "idea", e.g. the idea of a horse and what we see are instances of this idea. This is extremely similar to the relation between classes and objects.

With your bare hands?!?

Working...