11 ms·
Programming languages are not languages (2018)
- schoen 7y agoThat's interesting -- although I agree that it's important to distinguish programming languages from spoken languages and that they do very different things, I could imagine that the Sapir-Whorf hypothesis applies better to programming languages than to natural languages! After all, we hear all the time that programmers in a particular environment analyze problems differently, or think of different solutions, or do or don't write certain kinds of bugs, compared to programmers in a different environment. Since strong forms of Sapir-Whorf have come in for so much criticism among linguists as applied to natural language, I'm not sure my intuition about this points in the same direction as the author's!
- empath75 7y agoI agree, computer languages push you into particular ways of solving problems and away from other ways.
- eindiran 7y agoPaul Graham has an interesting take on the idea that the strong Sapir-Whorf Hypothesis applies to programming languages, though its not exactly phrased that way: http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html I tend to agree with your hypothesis: firstly, I don't think that the strong form of the Sapir-Whorf Hypothesis holds for natural languages [0], which sets the bar pretty low for PLs. And secondly, the SWH does (seem to) hold for programming languages: the cognitive tools and abstractions reached for by users of language A can be very different from those reached for by users of language B. Lisp users, Haskell users, C users, Forth users, etc all seem to think about problems differently. It would be interesting to see some empirical work on this. [0] Almost all post-Chomsky linguists agree with this, but there are a few that have tried to argue that you can kind of bend the strong form to make it fit some empirical results; see the color word research of Paul Kay for example -- http://www1.icsi.berkeley.edu/~kay/Kay&Kempton.1984.pdf http://www1.icsi.berkeley.edu/~kay/Kay&Kempton.1984.pdf
- Vanit 7y agoI'd say the strong version of the Sapir-Whorf hypothesis applies, but the subject is the computer, not the human.
- Avi-D-coder 7y agoAny turning complete language can only uphold the Sapir-Whorf hypothesis at the level of types, kinds or higher. By definition at the term level you can express any cognitive categories. The weak hypothesis applies, since languages encourage use of terms in cognitive categories amenable the type system.
- fileyfood500 7y ago"And here’s why I don’t think the Sapir-Whorf hypothesis fully applies to programming languages. When we program we categorize the world in English (or Spanish, or any other natural language), and then we encode that into a program. So the programming language I’m using, is not limiting the way in which I see the world." I agree that programming languages and natural languages are different. That being said, programming languages do meet the definition of languages bc they communicate structured information. Example: "if x < y { string z = `${x + 1}` } else { string z = `${y - 1}` }" . This short program communicates a structured piece of logic with clear meaning. It's not all encompassing, but then, neither is a English.
- platforms 7y agoAccording to Sapir-Whorf, what I think is affected by what the language I think in, that lets me express my own thoughts to myself. If there's no concept in English for an idea that occurs to me, it may remain muddled or I just might not become fully conscious of it. This is not the case for programming languages, because programming languages, even non-imperative ones, only have one mode: how to do something. They are not a way of describing the world. If I can't figure out the C++ code necessary to accomplish the task I want, that doesn't mean I can't imagine what that task is. Determining the task and figuring out how to code them are very different.
- geocar 7y ago> If there's no concept in English for an idea that occurs to me, it may remain muddled or I just might not become fully conscious of it. You probably won't be. I have observed a similar phenomenon when trying to imagine truly new things. > If I can't figure out the C++ code necessary to accomplish the task I want, that doesn't mean I can't imagine what that task is. If you can't figure it out in C++, but you could in (say) assembly (or Perl, or Python or whatever), then I would agree with that and would say I don't think that's an essential limitation of programming languages, and just that C++ is unfamiliar and byzantine. But if you can't figure out the task in C++, but [believe] you could in [plain] English, I'd say you're just wrong: Whenever someone has told me "the ticket is perfectly clear" it most definitely was not. If your experiences are different, I'd like to hear about them.
- nikofeyn 7y agois medium code for i've just read about something i haven't read before and here's some loosely related thoughts? the author is not even familiar with racket nor does he seem particularly familiar with what language oriented programming (LOP) is. the author does not give definitions of things that he makes comparisons between. for example, no definition of language, natural language, programming language, or metaphor is given, and he even conflates natural language with language. and this entire article seems to be based on analyzing the meaning behind a footnote. what he misses is that the racket/LOP community think of programming as communication between people and not between human and machine. matthias felleisen says so here (https://www.youtube.com/watch?v=91hynuuM_As https://www.youtube.com/watch?v=91hynuuM_As). that is the very definition of language: the words, their pronunciation, and the methods of combining them used and understood by a community (merriam-webster). this definition is actually a little overly specific, but one thing i am reminded of is the text from SICP that says: > when we describe a language, we should pay particular attention to the means that the language provides for combining simple ideas to form more complex ideas. Every powerful language has three mechanisms for accomplishing this: * primitive expressions, which represent the simplest entities the language is concerned with, * means of combination, by which compound elements are built from simpler ones, and * means of abstraction, by which compound elements can be named and manipulated as units. > Also when they refer to “extra-linguistic mechanisms” do they mean different codes as in semiotics? the author should understand what they mean before writing this article. by extra-linguistic mechanisms they mean reaching outside of the chosen language, like java, to other languages (these are the configuration, project description, and makefile languages mentioned). the purpose of LOP is to bring these extra-linguistic mechanisms into the base language. so in racket, rather than creating a wholly new languages for documentation, they created scribble which is a language that sits on top of racket and can interact with racket. this is turning the extra-linguistic mechanism of writing documentation into a linguistic construct so that scribble is not a totally separate language, it is an extension of racket. > If we want to think about what kind of problems a programming language makes easy to solve, and which ones they make more difficult, I’d say it’s better to use the tool metaphor, and see where that framing could take us. the so-called tool metaphor has been the dominant view and is the source of almost all problems of software. software is not just a tool. what makes software hard is that it isn't one thing. it is all of a way to do something (a tool), a way to think about something (a conceptual model), and a way to communicate something (a language).
- hombre_fatal 7y agoI know this isn't related to the article's content, but I've certainly, and sheepishly, thought at some point in my youth that learning programming was pretty admirable like learning a second language. Sure, you learned French, but I learned C++, I would think to myself, envious. Then I actually learned a second language in my late 20s and chuckle at my former hubris (well, more like wishful thinking) that a programming language was comparable. Programming was just something my socially destitute self did for fun in the comfort of my bedroom. To learn how to speak a language, I had to (shudder) talk to other people. And socializing with people isn't this finite, self-defined virtual world like your game.js file where you just invent your own physics: You have to actually figure out the social world.
- coliveira 7y agoThis is an illusion that was fed early on by people working on programming. The reality is that programming languages are languages, but only for a very restricted vocabulary that is not even close to what can be done on human languages. Also, being fluent in a human language involves not only reading and writing, but also talking, which as you pointed out is a considerably more complex skill.
- leetcrew 7y ago> Also, being fluent in a human language involves not only reading and writing, but also talking, which as you pointed out is a considerably more complex skill. I would push back slightly on this. I don't consider the ability to have a conversation in french to be a greater achievement than reading (and understanding) a latin text.
- filleduchaos 7y agoAre you bilingual?
- leetcrew 7y agoI wouldn't call myself bilingual, but I speak enough spanish to make myself understood by people who don't know any english. can you read latin?
- Koshkin 7y agoWell, language is a wide term. Even mathematics has been called "a language" many times (e.g. the language in which Nature "talks to us", the language used by physics, etc.). Indeed, a language is a system of symbols that is designed to facilitate communication, and one can certainly think of a programming language as a way to communicate programs to a computer!
- throwaway55554 7y agoNo mention of Noam Chomsky.
- madhadron 7y agoI have two responses to this: First, I don't think he quite gets what the Racket folks mean by "language oriented programming." They're not talking about adding stuff to the whole language. They're talking about making the toolbox for generating languages and connecting between them so straightforward that you build something more than DSLs, more like adapted variants that share some kind of common semantic core. Second, a human language is a mechanism for establishing and playing language games. A programming language, like any other formal notation, is a means of expressing the subjects of a range of language games. Consider the various language games you play on a function: summarizing, calculating run time complexity, simulating, listing side effects... Language oriented programming is a way of saying that there are often specialized language games that are important in a particular context but nonsense outside of that context, and it would be nice to make it easy to engage in them in that context without trying to force the whole world into that image.
- hashmal 7y agoIn an article that argues that something is or is not a language, I would expect the term to be defined first. Ironically, a definition for the term "define" is given.
- Hitton 7y ago>A LOP programmer who resorts to extra-linguistic mechanisms effectively acknowledges that the chosen language lacks expressive power. Tom this sounds about as correct as saying that someone who resorts to using picture/diagram/melody/.../whatever beside text acknowledges that the chosen language lacks expressive power. Although correct, it's so vapid sentence that I don't think it deserves having whole article based on it and in the end makes the article itself needless as well.
- physicsyogi 7y agoIt seems like the author is wrong about the weak Sapir-Whorf hypothesis not applying to programming languages. This is anecdotal, but once I learned Clojure, some things about the way I thought about problems changed. I didn't think about things in a functional way before that. The same has happened since I started learning Rust. Now I'm thinking about ownership and lifetimes. And in C I had to manually allocate and free memory. Perhaps the hypothesis should be amended to refer to programming language paradigms, or something along those lines.
- ModernMech 7y agoI really like this talk from Splash 2016 by Amy Ko called "A human view of programming languages". It explores various metaphors on Programming Languages including PL as language. I think she makes a very good case for why it is important to analyze programming languages from different perspectives. https://medium.com/bits-and-behavior/my-splash-2016-keynote-81cc802f5f6e https://medium.com/bits-and-behavior/my-splash-2016-keynote-... After watching Amy's piece, I have to disagree with the conclusion of the author at hand: "I’d say it’s better to use the tool metaphor, and see where that framing could take us." I think the PL as tool metaphor has been almost as thoroughly been mined as the PL as math metaphor. Most PL conferences are filled with papers approaching PL from these angles -- we know where that framing takes us. The other metaphors are more interesting to me and I think are more ripe for interesting new research (good luck getting them into some PL conferences though).
- chaostheory 7y agoThe post just highlights one of computer science's biggest problems: naming.
- dnautics 7y ago"I’m not sure [the sapir-whorf] hypothesis applies to programming languages" Is that really true? Having moved from OO programming to distributed functional programming, I definitely think that my worldview is different; I'm constantly thinking about how to deal with systems unreliabilty and message passing latency, which is not where the bulk of my time was spent thinking when I was writing for non-concurrent systems with shared memory
- deleted 7y ago[deleted]
- type0 7y agoWould BASIC be a programming lang equivalent to Pidgin?
- iamwil 7y agoMeanwhile, web developers complain about having to learn and master a half dozen languages and frameworks.
- Twisol 7y ago> When we program we categorize the world in English (or Spanish, or any other natural language), and then we encode that into a program. Speaking solely for myself, I don't find this to be true. Yes, it does seem to be the case that you have to represent the program in your mind before you can accurately convey it to the computer. But no, I don't find myself using words to represent that. Maybe I use English to talk myself through the concepts, but I would not conflate the mental model with the words I use to describe that model. My mental model feels a lot more like data structures -- abstract relationships between parts of the program, degrees of closeness, and senses of information flow. I can't represent the brainfeel of that in words without losing too much of it. And very often, yes, the semantic world in which I know this program will be embedded -- by way of a programming language that exposes that semantics -- does influence how I think about the program. > If we think of programming languages as tools, then it becomes evident how some programming languages lend themselves naturally to problems that in other languages might be — while not impossible — hard to solve. See for example Erlang, a language that’s tailored for Concurrency Oriented and Message Passing programming, or Racket itself, a language tailored for LOP. I don't understand the proposed distinction. If we can agree that the "tool" affects how you think about a program built using that tool, aren't we ultimately just quibbling over what the word "language" means? I feel like that's missing the point of the assertion that programming languages are languages -- you still end up with some form of Sapir-Whorf. The idea of a "programming language paradigm" better captures the essential semantic distinctions between languages, but even these can be too coarse-grained. I'm more interested in adjectives like "single-ownership", "message-passing", "immutable", "backtracking", and so on. Words that describe the semantic world that the PL purports to be an interface to. Maybe that's what the word "tool" is supposed to convey, here, but then I don't think PL researchers really disagree.
- sporkologist 7y ago> While the world is a continuum, we slice into tiny pieces, we discretize it with words. To me the world is objects. To you maybe it's a continuum.
- mellow2020 7y agoAny object I could name seems ultimately arbitrarily defined at some point, it's "object-ness" simply a thought in my mind.. and even that only as long as I actively uphold it, since a thought isn't an object either, but a process. Sure, I also slice the worlds into things with words (or unspoken thoughts that do the same thing), I have quite the ego actually, and I find that fun; but when I recursively ask "what is X?" and then ask that about whatever it consists of or is affected by, it quickly ends up nowhere, in a cosmic shrug. Where exactly does an atom begin or end? Where does my body end, and does it also occupy the vast empty spaces between atoms, and so on? Is it solid with an outside, or rather just a bunch of probability clouds loosely held together by mysterious forces? Considering all mass attracts all other mass in the universe, no matter how weakly, can it be considere separate? All I can say for sure is that "there is something", or "there is something going on", but I don't even know which of either, or if one follows from the other.
- runesor 7y agonot yet
- ben509 7y ago> And here’s why I don’t think the Sapir-Whorf hypothesis fully applies to programming languages. When we program we categorize the world in English (or Spanish, or any other natural language), and then we encode that into a program. I'm not sure I do that. I'm often "thinking" about code by stubbing out functions or classes. I definitely don't translate algorithms I'm familiar with from English, I just write them directly. But say that's how we do work. What happens next? Someone else looks for a bug. Or someone else adds a feature. Maybe you refactor. A real software project is a team effort that requires countless interactions between authors over time. The structure of the programming language dramatically influences the development of a large scale project. There are selective pressures all the time, you can rarely put into words why certain things are "idiomatic" to a language, but when a particular expression is confusing or odd, someone is likely to clean it up before long. So, yes, programming languages are absolutely languages.
- geocar 7y ago> And here’s why I don’t think the Sapir-Whorf hypothesis fully applies to programming languages. When we program we categorize the world in English (or Spanish, or any other natural language), and then we encode that into a program. I certainly don't "categorize the world in English" before "encoding that into a program". I've also met dozens of programmers over the years who found it easier to "show code" than to explain in English (or Spanish or any other "natural" language). I would be shocked to discover this is an isolated phenomenon. In Iverson's book "A Programming Language" (1962) says in §1.1: Ordinary English lacks both precision and conciseness. The widely used Goldstine-Von Neumann (1947) flowcharting provides the conciseness necessary to an over-all view of the process. only at the cost of suppressing essential detail. The so-called pseudo-English used as a basis for certain automatic programming systems suffers from the same defect. Moreover, the potential mnemonic advantage in substituting familiar English words and phrases for less familiar but more compact mathematical symbols fails to materialize because of the obvious but unwonted precision required in their use. So I'm not sure Iverson would agree either. Maybe just start with something simple like: Why is it important to classify programming as "not a language"? I had a hard time understanding what the author might think the answer to this question is. The only thing that jumps out at me is this: > … after seeing what happened with Scala and SBT, where sometimes the project build description ends up written directly in Scala, I’m not sure having one language that encompasses all is something I’d want … > Is it worth to expose users to an alien configuration format, just so the developers of the project can program in just one language? If you seek a purely utilitarian answer; an answer to what makes the software best perform the intended function, then yes it is worth it: There will not be bugs in the code you do not write. However getting people to use your software (i.e. "Sales") means making the software accessible to other peoples expectations and that's a social exercise. This is a business decision with simple economic drivers, and not a technical one. Some languages are simply better at sales than others; English is the most widely-spoken language in the world, but that doesn't mean English poetry is superior to Chinese poetry.
- yellowapple 7y ago> And here’s why I don’t think the Sapir-Whorf hypothesis fully applies to programming languages I don't think it applies to languages, period. The Sapir-Whorf hypothesis seems to me like a classic case of inverted causality ("wet streets cause rain", as Michael Crichton put it). Sure, it's definitely possible that in a given instant one's language might constrain or otherwise influence one's cognition, but it's vastly more likely to be the other way around: if the language is unable to support a concept in one's cognitive process, an individual is prone to bend the language, whether by grabbing a loanword from some other language, recombining roots to create a new word, or what have you. That's the fundamental issue with programming language design that I think the author's trying to articulate: they're designed, and more fatally, they're designed in such a way that they're rarely able to evolve as needs dictate. The many Eskimo words for snow didn't come down from on high and conjure those forms of snow (and their perception by humans) into existence; rather, I strongly suspect people encountered (and had to describe) these different kinds of snow often enough that they found it worthwhile to give them names rather than merely descriptions. Phrases turned to compound words turned to shared roots. This is in contrast to most programming languages; yes, at some point they were obviously created to satisfy a certain need and give "words" to certain computing concepts, but very rarely are they able to fully evolve to address new computing paradigms (at least not without rigidly declaring a new version or new dialect of the language with new syntax or keywords, which just punts the issue a bit farther into the future). There are a handful that are better at this (Lisp, Forth, and Tcl - and their respective descendants - all come to mind), and they happen to lend themselves well to DSLs, but I feel like they stop just a little bit short of being able to entirely evolve on their own; programming languages need implementations and runtimes to be actually useful, and few (if any) languages provide the mechanisms to freely manipulate their own implementations/runtimes (there are certainly plenty of Lisps that can bootstrap themselves and other Lisps, but that's almost always an ahead-of-time operation with little to no exposure to the language user, nor any practical means for said user to leverage that within one's own code to tailor the language and the implementation thereof to the exact problem domain).
- Tainnor 7y agoI don't think Sapir-Whorf (in a weak form) is just a case of inverted causality. Sure, matters of perception shape the language we speak; this happens all the time. But the key point is that the reverse direction happens too. Language is a perfect medium to transport preconceived notions and because we don't think so much about it (indeed, we think lots of things are natural, when they're actually particular features of a single language) it's particularly subtle. Examples of this include gender/classifier systems, colour perception, evidentiality markers, or one of my favourites, spacial recognition: one famous experiment shows that members of a particular Australian aboriginal tribe (Guugu Yimitthir) think in terms of absolute cardinal direction even in everyday situations instead of left and right; in fact they don't even have words for left and right. Of course, the reason for this development is originally due to the landscape around them, but now the language which lacks such terms serves to reinforce this worldview. My only qualm with Sapir-Whorf is that it only credits language with this cultural transmission. But there are a lot of other things that can do this (arts, rituals, customs), even if language is a big part of it. Well that and that the original version ("the Hopi don't know the concept of time") is a bit ridiculous.
- DeathArrow 7y agoI believe programming languages have few things in common with natural languages. Even though some experts in psychology claim that foreign language skills is a better indicator than math skills if someone will be good at learning programming languages or not. At MIT some people tried to write code using natural language: http://news.mit.edu/2013/writing-programs-using-ordinary-language-0711 http://news.mit.edu/2013/writing-programs-using-ordinary-lan... Both programming languages and natural languages can be described in terms of Formal language theory and that's the most they have in common: they have words, grammar.