문제

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 if, for, while, and 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?

도움이 되었습니까?

해결책

Ah, the Sapir-Whorf hypothesis vs. the Chomsky Deep Structure hypothesis wars...

Programming is mathematics. Mathematics is applied philosophy. The question then becomes, which natural language can exactly describe mathematical concepts without significant head-scratching. Put another way, which languages can deal in Aristotelian metaphysics easily?

The proverbial 'savage' language may have initial difficulty expressing the first-order abstractions that are required. However- however! - humans can learn new words, and new concepts. Ancient Greek didn't start out with philosophical terms; they had to be invented and then ported to other langauges.

Considering that mathematics is a universal, I postulate that the strong Sapir-Whorf hypothesis is false.

다른 팁

I don't know that any particular natural language lends itself to better programming (except maybe Latin?). I do know that knowing more than one language is pretty powerful.

Dijkstra said in one of his last interviews (as reprinted in CACM Vol. 53 No. 8, p. 44):

There is an enormous difference between one who is monolingual and someone who at least knows a second language well, because it makes you much more conscious about language structure in general. You will discover that certain constructions in one language you just can't translate.

Turkish is a very interesting language as it has strict rules without exceptions (that i am aware of), is nearly perfectly redundant-free, has no grammatical gender, and on word can express as much as a sentences in english.

In the past "Çekoslovakyalılaştıramadıklarımızdan mısınız?" which means "Are you one of those people whom we couldn't make resemble from Czechoslovakia?" was very popular and accepted as the longest word in Turkish. However, the question suffixes (mısınız in this case) are written separately, so though it is one word, it seems like two words when the word is written. Also, longer versions of this word could be made easily, such as "Çekoslovakyalılaştırabildiklerimizden miydiniz?". For these reasons, the word lost its popularity, but it is still a popular tongue-twister in Turkey.

talking in turkish makes me the think about what i want to achieve, what information I want to transmit, and less about what words to use.

edit
Of course Turkish has words to represent the biological gender. But it doesn't have separation into he/she/it — in Turkish "o".

Or in Spanish you would say "profesor/profesora" and in German "Lehrer/Lehrerin". In turkish you have to use extra words to indicate the gender — similar to english.
In turkish teacher is öğretmen. To point out a female teacher you'd say "kadın öğretmen" — woman teacher. But despite of german, where — if not femalelized by adding an "-in" — the default is male, öğretmen has no gender, as there isn't.

Another thing that isn't available in Turkish are articles like "el/la", "the", "der/die/das" — as it usually is just information that is already available by the context.
But there are words to express "this", "este/esta", "diese/dieses/diese", for example "bu".
This is extra information, as it is pointing on a certain object.

I think it's more likely that the programming language you are using will shape the way you are thinking about the problem, the variable and class names, etc, are just characters representing something. Though it is very likely that programmers in different cultures think about programming differently because of their spoken language and the way that they learned.

In my opinion, the natural language doesn't matter (or at least shouldn't matter) at all when talking about the methods or ideas you are trying to realize with your code.

As you said yourself, when working with the code itself and writing documentations about the code english is the most appropriate. But as the code itself is just a handcraft, the real strength of a programmer/computer scientist lies above that with ideas, algorithms and such things - and then, the language those things are described in is completely unimportant for the actual content.

This was a topic I was very interested at some time, therefore my even greater (now) sorrow, that I cannot find the bookmarks I had back then.

I did save a link I stumbled the other day onto, Do Different Languages Equal Different Realities? that tangents somewhat onto it (read the comments as well). Some are interesting.

Anyways ...

English is actually pretty efficient and concise. Translation into most languages will make an idea longer to express.

It's also generally accepted that there are no primitive natural languages. All natural languages in active use have an equal level of expressiveness. That isn't to say ideas aren't formed by language, but I don't think natural language is a big influence.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top