There are reasons to learn more than one programming language. However after learning a few there are also reasons to focus on and become an expert in a single language or at least a couple of similar languages.
One of the problems with programming languages is complexity. Even simple languages have complex libraries.
Using a language means dedicating hours of time (10-18 hours a day) reading up on, practicing, and mastering both syntax quirks and library quirks.
One can argue that flipping languages is like an on-off light switch. However it is not.
Learning a language is all about getting used to quirks and qworks. These quirks and qworks actually take years and decades to get used to. As soon as you flip languages, you lose access to a lot of your quirk and qwork experience - until you relearn the quirks and qworks in the new langage. You find out that in LanguageB you have to do it different than in LanguageA, yet the end program is the same and you just wasted 8 hours studying a quirk in LanguageB that you already knew about in LanguageA. It's not that you saved much time learning the same thing.. rather you wasted time.
Can Never Learn Enough Languages?
True, you gained more experience by learning more languages.. but how many languages are you really going to master?
A Language Includes Its Libraries
And not just its libraries but its wrappers around the libraries and its declarations that interface into the libraries.
Even when using the same underlying libraries (i.e. Win32 API) in different language, the code you write can be extremely different just by changing languages.. since not all wrappers are equal! Due to a quirk or qwork in a header declaration, or due to a entirely different wrapper.. flipping languages isn't lickedysplit like some would claim.
Programmers & Doctors
Think about doctors who specialize in Ear, Nose and Throat.. who do not focus on feet. If it is so easy to flip languages, why don't doctors stop being specialists and focus on the entire human body? Jack of all trades doctors, such as family doctors.. aren't the best specialists you can get. Doctors that are specialists all speak english in USA and Canada.. but they focus on different parts of the human API.
So if a Doctor specializes in parts of the human API using the same english language, why can't a programmer use a programming language and specialize in parts of an API?
I'm not a fan of these jack of all trade programmers who learn 50 languages and say "I use a hammer and a screw driver for a different purpose". English isn't a hammer, nor is any real computer programming language. One procedure in the API may be a hammer.
Realistically, when does one have time to use all 50 languages, and what real benefits does one gain out of using 50 languages - other than the loss of time, if this is considered a benefit? Think: sometimes it takes 4 hours of procrastination per language just to start typing code... multiply that by 50 and you've already gone past 24 hours in a day.. and there are only 8 hours in a day since you sleep, drive, eat, etc. In fact, barely even 8 hours in a day.
Bugs Are Quirks
Some bugs in one language are not there in the header declaration other language. Getting used to the bugs and workarounds in one language's library takes time.. and if you assume one bug in one language's library will also exist in another language's library, your assumption is wrong.
Say you spend 10 years as a WinAPI programmer in one language. Just flipping languages isn't so easily since usually you have been using WinAPI wrappers... none of the C++ or VB winapi wrappers are like Delphi wrappers.. hence relearning all the quirks and quorks of VB and C++ is going to take another 5-7 years if you decide to flip. It will be faster to flip if you already know one language.. but in no case is it an immediate swap like the multiple language hammer/screwdriver advocates would proclaim.
The Right Tool For the...
Many times, people argue that 'a hammer is for hitting nails and a screwdriver is for a different task'. This is not always true when it comes to languages, since languages are general purpose tools and not specific tools (see turing complete). In programming, a language is a general purpose multiknife that can do many things. For example freepascal compiler can build make files now with fpmake or my build system, instead of crappy GNU make.
Not a Hammer
Freepascal (and delphi) can build web programs, it can build GUI programs, it can build console programs, it can build audio software, it can build DOS software, it can build Linux software, it can build Windows software, Gameboy software, Palm software, and many more. It is not a hammer.. it is a big garage.
Someone who advocates the hammer analogy might use MAKE since MAKE is a hammer for making stuff. Make is not a general language but a specific one. Makefiles suck.
Makefile tools (i.e. GNU Make) are dedicated to making projects.. so why would we use fpmake or a build system in modern pascal or python? The answer is that makefiles are just yet another programming language (a stupid one) that no one needs to or wants to learn. Except some ridiculous unix programmers who actually like make files.
When modern Pascal can be configured to become a make system itself, would a modern Pascal programmer choose a makefile language or just use Pascal if he could?Chances are, if the modern pascal solution is good enough (or better) - he will choose the modern Pascal solution. Makefiles after all are just programs.. and most makefile languages are crippled languages.
One could argue that you choose a makefile for making projects, just as you choose a hammer for hitting nails.. but see, this is false. FPMAKE files or my build files work better and are cleaner than the hammer called MAKE. The MAKE hammer is a piece of junk. The hammer inside the modern pascal swiss army knife (irony: Wirth is Swiss) is better than the dedicated MAKE hammer.
Spoken languages are not hammers and screwdrivers. We do not choose English for some paragraphs on this page, and Japanese for paragraphs, and French for other paragraphs, and German for other paragraphrs, and Spanish for other paragraphs on this page. That would be a complete waste of resources. Learning the quirks and qworks of each spoken language and spending time learning the quirks and qworks of as many spoken languages as possible means less time for real work.
My build system for powtils and fpmake for fpc is the perfect example of why we do not always need dedicated individual specialized hammer languages when it comes to programming languages. A compiler/language can create hammers for you. A language can be many hammers itself.. it is not a specialized hammer.
If FPMAKE and my object pascal build system is a hammer, then it is a hammer that you pivoted out from the swiss modern pascal army knife (irony: Wirth is Swiss).
One advantage of software is that we can magically reuse code and tools and connect them together. In real life we cannot do this as easily.. so comparing real life hammers and screwdrivers to programming languages is.... not right. That analogy failed.
Use All These
Do you really need Java, Coldfusion, ASP, PHP, Perl, Python, Pascal, C++, Makefile language, Bash, and Ruby to make your website the most powerful website of all? Wouldn't choosing multiple languages mean more power and flexibility? Or do you pick one or two languages and have your site excel because experts chose one or two languages and not 54?
Wish: Bash/Batch Files Suck
Autoexec files (batch files) and bash shell scripts suck donkey bum. It would be nice to have a Qompute or modern pascal system to make compiled programs that run at the shell.. just like how fpmake and my build system for powtils are modern pascal make systems. Make systems are similar to scripts... but they don't have to be scripts even, as fpmake and my build system for powtils has proven.
A nice operating system would have a modern pascal or qompute shell system where instead of all the crappy ugly Bash and Batch files.. you simply use Qompute or modern pascal programs. No we do not use C programs as PChars in C cause it to be horrible for a shell.. can't do lazy stuff quickly. Ansistrings, modules (units) and wrapper procedures in modern pascal make it better than C for utilities that replacee bash scripts.
(What did UCSD pascal use, BTW? How about Apple Pascal scripts? They died, sadly.)
I think Qompute would be even better candidate for shell utilities than modern pascal since it is less heavy handed of a language. However, even modern pascal is okay too, as FPMAKE and my build system has proven. You don't NEED to use the MAKE from GNU or the microsoft make. No.
Bash: a Pascal Mock
The Bash scripting language syntax has lots of similarities to Pascal/Algol in some manners.. but the bash language still sucks compared to a real language like qompute or modern pascal. So why hide behind a bush? Just use pascal or qompute and stop faking it with these "hammer" languages or these "cracked cheap broken wrenches".
Jack of All Trades
Getting your feet wet in a few spoken languages is healthy.. but mastering them all and continually flipping between them is a waste of time and resources. Unless, you are a translator that works at a translator service.. like PROMT or GOOGLE translation.
How would you like it if in each of the above paragraphs, I switched languages? What purpose would that serve? The only person that would find this interesting and the only person that would appreciate such a thing would be someone who has a job at a translation company, or some quiche eater who academically studies languages in his spare time just for the sake of studying languages. Even those people might find it irritating if I switched languages every sentence or paragraph in this article.
Recently I was going to write a shell script for a batch task.. then I slapped myself in the face and wrote a modern pascal program.. and it was neater and cleaner than the shell script would have been.. and I ended up making a nice unit that wrapped a few functions which I could reuse in other modern pascal programs.. none of this reuse would occur if I had switched languages to write the little program in a shell script.
(also, the unix shell scripts would not work on MS Windows terminal if I wanted to run the shell program there.. so I'd have to make a BAT file and an SH file which duplicates code. Unless I installed Cygwin which is yet another annoyance. Whereas the pascal program is portable from day one when written in FPC. Idea: a fpc mini compiler and mini RTL could even be embedded with the download so no separate fpc dependency exists on any platform as it is shipped with the "script" that gets compiled)
Want the speed/ease of use of a script? Build a system that has the compiler forked open waiting to compile unitXXX and have the compiler run the program immediately after compiling it.. instead of making you do all the compile/link/run. Many times scripting is overrated too.. and scripts are not necessarily better hammers than compilers. After all, all scripts must at some point be compiled or read in some way or another.
I will say however that HTML is a better markup language than Pascal or Cee or Ada... and that html templates have their use. And I will say that wildcards and mini languages such as regexes or excel formulas do have their use.
See also: Stop-The-Multiple-Language-Insanity