Sapir–Whorf and programming languages
From Wikipedia, the free encyclopedia
The Sapir–Whorf hypothesis is sometimes applied in computer science to postulate that programmers skilled in a certain programming language may not have a (deep) understanding of some concepts of other languages. Though it may equally apply to any area where languages are "synthesized" for specific purposes, computer science is especially fertile when it comes to creating languages.
Computer programmers who are fluent in different programming languages (e.g. C, Prolog, Ruby), and/or programming paradigms (e.g. logical programming, declarative programming, imperative programming, functional programming, object oriented programming), often see the same problem in completely different ways.
One way of stating the Church–Turing thesis is that any language that can simulate a Turing machine can be used to implement any effective algorithm — in this sense, it is irrelevant what language is used to implement a particular algorithm, as that exact algorithm can also be implemented in every other language. However, when designing an algorithm to solve a particular problem, programmers are sometimes heavily influenced by the language constructs available. Though a large part of this is undoubtedly the way of least resistance (implement whatever is easiest to implement), there is also an element of "appropriateness" or "naturalness" that seems to compel the programmer to a design that "befits" the language.
This is a similar situation to Feynman's view of physical theories: it is possible for two theories to use completely different concepts and rules but still give identical predictions. However the 'parameterization' of each theory will suggest different possible modifications and experiments to the human physicist who uses it.
Most programmers consider this to be beneficial, and the bewildering multitude of programming languages can be defended with the remark that a new programming language, while not extending the set of all possible algorithms, does extend the set of all algorithms we can efficiently think about. A well-known saying by Alan Perlis states that "a language that doesn't affect the way you think about programming is not worth knowing".
This is not universal, however. Programmers familiar with only one paradigm often find the task of algorithm design largely the same, regardless of the programming language used. And, due to the current overwhelming dominance of imperative languages in commercial applications as of 2006, the supposed diversity of programming languages is often a case of slightly different syntax for essentially the same set of programming language constructs. Another famous epigram states that "a good FORTRAN programmer can write FORTRAN code in any language".