Linguistic relativity is the idea that language shapes the way we think. My question is, how much, and to what extent, does this apply to programming?
- Are some native, natural languages better-suited for thinking about programming than others? For instance, can the following be stated more concisely in a non-English language?
Select a pivot. Move all the items less than the pivot to one side of the list, and all the items greater than the pivot to the other side.
- Does a Chinese-speaking programmer view programming in a radically different lens than an English-speaking programmer, or do the differences fade away when both are immersed in the subject?
- Are some programming languages and domains easier to think about in one language or another. For instance, is it any easier to grok Ruby if you are Japanese because the creator of Ruby is Japanese?
Note that this question is not focused on "how do programming languages affect the way people think about programming", but rather "how do natural languages affect the way people think about programming".
To get it out of the way, one language that clearly has a pragmatic advantage is English. I think the advantage has little to do with programming languages choosing English keywords like
do, just as musicians who don't speak Italian aren't tripped up by words like forte. It has more to do with communication of ideas with other programmers, as English is the lingua franca these days, at least in the programming world. For instance, to ask a question in StackOverflow, you really need to know English and know it pretty well if you want good answers. Although this sounds like an imperialist attitude, it really is true in practice.
That aside, how do the intrinsic properties of languages affect how programmers who speak them think about data structures, algorithms, etc.? Are any languages particularly concise when it comes to talking about logic and programming, allowing native speakers of those languages to think faster?