Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Do programming languages, that we are mainly coding in, really change the way we are thinking about problems? Sort of programming kind of the Sapir–Whorf hypothesis. And if they do, doesn't it really mean, that there are programming languages, which can make us, well, not stupid, but narrow-minded?

UPDATE: this question is actually not about acknowledging the fact that we all should know at least three or four languages. This goes without saying. But what if there are some "dangerous" languages, which is better not to learn at all?

share|improve this question

closed as not constructive by Aaronaught, Mark Trapp Sep 8 '11 at 3:27

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

16  
Any single language makes you narrow-minded if used exclusively. –  delnan Sep 7 '11 at 10:15
6  
"I think of the company advertising "Thought Processors" or the college pretending that learning BASIC suffices or at least helps, whereas the teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery. " --- "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." - Edsger Wybe Djikstra g –  Falcon Sep 7 '11 at 10:16
4  
@shabunc: Or maybe the way you think influences the way you pick languages. –  R. Martinho Fernandes Sep 7 '11 at 10:18
4  
If the question weren't so intriguing I would vote to close as too argumentative. <flame>That explains a lot about PHP</flame> ducks –  maple_shaft Sep 7 '11 at 11:51
9  
When it comes to brilliant PHP developers, my theory is that they are NOT brilliant BECAUSE of PHP, they are brilliant DESPITE it. –  maple_shaft Sep 7 '11 at 12:11
show 8 more comments

12 Answers

Programming languages affect the way you solve problems by making certain mechanisms easier than others.

If you use perl, it's easy to sole problems using lots of regular expressions. If you use a functional language like scheme or F#, you will likely see the solution as a series of transformations on a data set. If you use a language that supports low-overhead coroutines, such as stackless python or go, then it's easy to create a highly-parallel solution consisting of a large number of individually serial workflows.

Often the language you learn first will have a disproportionate influence on your problem solving style, which is probably the source of Dijskstra's comment about BASIC programmers being "mentally mutilated".

Still, I don't think that the exposure is absolute and permanent -- assuming that the programmer is willing and able to see problems and solutions in a new light when shown a different path.

On the other hand, some people learn programming exclusively as part of a larger goal, and aren't interested in learning new ways and new techniques once they've learned a workable way of solving their problems. For these programmers, the first langauge they learn is probably the only language they'll ever know very well, so the effect for them is dramatic.

share|improve this answer
add comment

There is no such thing as "dangerous languages".

Every language offers different ways of implementing a solution to the same problem, which will lead you to think in different ways than you are used to, ultimately opening your mind and enhancing your skills as a programmer (and not only). Programming always in the same language, using the same approaches to problem solving, won't make you more dumb, but won't make you more clever either.

That's why you should learn as many different languages as possible.

Languages such as Lisp, Scheme or Haskell are commonly cited as open-mind languages, and everybody suggests you to learn them, for example.

The important thing is that every time you program in a different language, you actually program into the language, using the richest expressing power the language can offer, not trying to emulate another language style you are familiar with.

share|improve this answer
4  
Thankyou Jose, you have highlighted a mistake for me. Whenever I leave the comfy world of C#, I try to make xx language look and feel like C# to me... I realise now I should morph my thinking. In the words of Bruce Lee... "become the teapot" –  MattDavey Sep 7 '11 at 11:36
5  
@MattDavey: "Be water my friend..." ;) –  Jose Faeti Sep 7 '11 at 12:23
3  
@MattDavey: "You can write FORTRAN in any language." –  Zan Lynx Sep 7 '11 at 16:27
add comment

You can also argue the opposite way: If you have to solve every problem with a very limited set of tools, you have to invent new ways to use them all the time.

Is there any evidence, not just in programming, that using multiple tools makes you more or less stupid?

Can people really get stupid, after not being so, without an accident which damages the brain?

There is a lot of wishful thinking floating around. Don't believe every book claim, especially not, if it quacks like a duck. :)

share|improve this answer
1  
If every tool you have is a hammer, every problem looks like a nail. For example, if you only know Java and JavaScript, you'll never be able to simplify your JavaScript code with functional paradigms. –  configurator Sep 7 '11 at 13:26
3  
There's anecdotal evidence: good programmers tend to know multiple languages (although they may only work in one), generally ascribe some of their ability to exposure to multiple languages, and usually advise learning multiple languages. We're not likely to get controlled experiments any time soon, so I'm going with what good programmers normally think. –  David Thornley Sep 7 '11 at 13:39
    
@David: The question is, whether there exist languages, which can make you narrow minded, so if you believe so, you have be careful what you try. :) Or keep on moving all the time - but I suspect, that you will get a deep knowledge over time, if you use the same language, and you won't get there in half a year. –  user unknown Sep 7 '11 at 16:28
add comment

It can, through a series of bad choices I ended up marooned on a COBOL island (my background was mainframe but Assembler, Pl/I, PL/AS) and working in COBOL definitely ruined my thinking for a while. For COBOL it's "if your only tool is a hammer, every problem looks like a thumb". The limits of the Linkage section etc make the most basic linked-list processing horrendous and you end up selecting solutions from a small and pedestrian toolkit and that can become a habit. These days C#, a bit of java, some VB, rexx, and once a year or so I drag out assembler so recovery is possible. And yes I am as old as you think ;-)

share|improve this answer
    
+1 for COBOL limiting your thinking. Its the only language I know of where hundreds of lines of almost the same but slightly different code ends up as the "best" solution to a problem! –  James Anderson Sep 8 '11 at 3:59
add comment

Programming languages are not really languages in the linguistic sense. They define syntax and a few basic words, but the vast majority of the "nouns" and "verbs" are defined by programmers. You define new variables and functions based on the primitives, then you use the vocabulary you just defined to define variables and functions at a higher level, and so on. The conceptual thinking is all done at the highest possible level of abstraction.

share|improve this answer
add comment

People are saying "Have Hammer;Everything Nail"

What about:

You have a nail (whatever size); how do I use my hammer?

Perhaps, rather than buying (into) other hammers, you can learn technique. Find out what you are doing wrong and/or right.

Then go to other hammers. See if the techniques you learnt translate. Or perhaps why they did not.

share|improve this answer
2  
But then, using unfamiliar hammers might open your eyes for better ways to use your old hammer... –  tdammers Sep 7 '11 at 17:41
    
yup, that's what I was thinking by go to other hammers; I just didn't mention the coming back. Perhaps if I had those 2 upvotes would be mine! –  burnt_hand Sep 8 '11 at 8:20
add comment

A common saying:

If all you have is a hammer, everything looks like a nail.

The tools we have at our disposal influence the way we look at problems and create solutions. If you've only ever worked in languages designed with an imperative style in mind, it can be difficult at first to learn a language that emphasizes a different style of programming, like OOP or functional programming. So, it seems obvious that it's good to have a range of experiences and have worked in several languages, and more importantly, several programming styles.

Can a language be "dangerous"? I don't think you can actually hurt yourself by knowing too much about different programming languages. The two biggest "dangers" I can think of are:

  1. Too many options. If you have some knowledge of several different programming styles, you may not know which to choose and never really feel comfortable committing to one. Or, you may choose inappropriately and end up making more work for yourself than necessary. This isn't really a problem of knowing too much, it's a problem of inexperience.

  2. Bad habits. It's often the case that the expedient thing is easier than the "right" thing. Some languages make this easier than others. In C, for example, it's easy to cast from one type to another in a way that works, but might be considered dangerous, violate your organization's style guidelines, etc. That's just the nature of C, and again the problem isn't that you know the language, it's that you use it in a particular way.

share|improve this answer
add comment

I think what you really mean its a "different programming paradigm", not just, a "new programming language".

Sticking to a single programming (paradigm) language, can make anyone stupid.

Its good idea to learn a new programming language, with a different main programming paradigm that the ones you already use. It has a funny effect in the mind.

Even if you still use the same programming language for your daily job, you'll be doing things differents, or consider more options to solve a problem in programming.

I learn a little of Lisp in my collegue years, while all those lisp inspired dynamic typing programming languages, didn't exist. My job programming language was Object Pascal, and still, learning functional programming, changed my way to solve problems, in the same Object Oriented plus Structured programming language daily job programs.

Cheers.

P.S. I not only a programmer, I do some "Hobbyst Psychology" ;-)

share|improve this answer
add comment

A good example is the use of poorly typed languages (formerly known as dynamically typed (I am still wondering where that dynamicity is supposed to be)).

The whole point of using a computer is the manipulation of data structures. And still some people seem to think that the following is easy and modern:

function dosomething(x, y, z)
{
...
}

It immediately raises the question how to call the function. What do I have to supply as parameters? What data structure is the function supposed to manipulate? What does the function return? There is just no hint of it. The most important information is swept under the rug. The users of those languages are forced to work in trial-and-error-mode.

Is it too much to ask to remember that technology is supposed to make life easier?

I don't know about the thinking of those people. But maybe those thought processes created the mess in the first place.

share|improve this answer
1  
I knew Lisp is making people more stupid. Fortran is the opposite, only the strongest survive. And, if you don't know what the dynamic (i.e. runtime) type information is, you probably should not talk about dynamically typed languages in the first place. –  SK-logic Sep 7 '11 at 14:22
4  
Static typing means that the types of all variables, arguments and return values are known at compile time and checked by the compiler. The advantage of this is that a large class of common errors cannot make it into production, because they result in compiler errors rather than run-time crashes or misbehavior; the disadvantage is that you have to persuade the compiler into accepting your code (i.e. you have to write your code to comply with the language's type system). Neither way is ultimately better (even though most programmers prefer one way over the other), and neither makes you stupid. –  tdammers Sep 7 '11 at 17:40
3  
You're seriously confusing strongly/weakly typed languages with static/dynamic typed languages. There's no fixed correlation between the two. Ruby, for instance, is as dynamic as they come, but is also extremely strongly typed. Javascript, also dynamic, has deplorable type safety. Maybe brush up here: en.wikipedia.org/wiki/Type_system –  Jason Lewis Sep 7 '11 at 21:36
    
@ThomasX - I wish I had the rep on this site to add my -1 here. You obviously don't understand what dynamic typing means yet you have the audacity to insult anyone who uses it? –  Chris Phillips Sep 7 '11 at 22:50
add comment

Yes, programming languages heavily influence the way we think about programming - everyone who has learned a new programming language that uses a different paradigm than the previous one can testify to this. The more languages you know, the broader your horizon, and that's always a good thing - you want to be able to look at problems from many different angles.

Learning or using programming languages never makes anyone stupid though; at worst, limiting yourself to one especially dumb language might shield you from certain things and thus keep you from expanding your horizon enough to become a good programmer, but you can't become any dumber than you already are through using a programming language. Refusing to learn new things is what keeps you stupid, not learning the wrong things.

share|improve this answer
4  
+1 There is no such thing as negative knowledge. –  Jon Purdy Sep 7 '11 at 16:21
add comment

We don't just write code in a language. We think about programming problems in that language. This, indeed makes us narrow minded in some sense, at least if we don't take notice and assume that this is the only way to think about a problem.

Therefore I suggest to master at least one language for each major paradigm (i.e. C/Pascal - Java/C#/Smalltalk - Haskell/Lisp etc.) With "master" I specifically denote the moement where you find yourself thinking or dreaming in that language.

share|improve this answer
3  
I'd add Prolog in there. While the programming techniques are not especially useful in other languages, the ability to perceive problems as logic problems is very useful. –  configurator Sep 7 '11 at 13:23
    
I fully agree - to know Prolog is a must, but I don't think one should have to master it. Same holds for Forth and it can't hurt to know one or the other of the esoteric languages - often they exhibit certain paradigms most clearly. –  Ingo Sep 7 '11 at 13:30
    
I'd never inflict Prolog on anyone. Say what you like about the paradigm it represents, nobody should have to suffer through having different semantic meanings depending on the capitalization of identifiers- let alone the fact that there's no alternatives for those of us who like things like static typing. Logical programming might be the best thing that ever happened, but Prolog sucks tremendously. –  DeadMG Sep 7 '11 at 16:34
1  
@DeadMG: The static vs. dynamic typing property of a language is actually one of the things where exposure to both sides is beneficial. –  tdammers Sep 7 '11 at 17:35
    
When you learn Prolog, make sure to look at constraints and delayed goals. Test and generate (yes, in that order) is a very nifty paradigm. –  starblue Sep 7 '11 at 17:49
show 4 more comments

I think it's more likely that choice of language reflects you, rather than influences you. For example, only the strong-willed survive prolonged contact with C++. Only those who don't mind losing control tolerate coding in Java. Et cetera.

However, that doesn't mean that being forced to learn a language by a professor or employer can't alter your perceptions, because it most certainly can, just like any other learning process. The above only holds for personal choice.

share|improve this answer
    
DeadMG, this is true, but the set of "appropriate", psychologically comfort languages, I believe, is pretty wide. I mean, yes, one can hate C++, and he chooses Java. Nevertheless he also can like D. And have some opinion on dynamic languages as well. –  shabunc Sep 7 '11 at 10:26
    
Reason for downvotes? –  DeadMG Sep 7 '11 at 15:49
    
that's not me, just saying. –  shabunc Sep 7 '11 at 15:51
    
@shabunc: Yeah, they came hours after you commented so I guessed it probably wasn't. –  DeadMG Sep 7 '11 at 16:04
    
I haven't downvoted either, but I guess the sentences "For example, only the strong-willed survive prolonged contact with C++. Only those who don't mind losing control tolerate coding in Java" are at least debatable and some people probably feel offended. –  Falcon Sep 7 '11 at 16:54
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.