I'm a programming dinosaur. I learned Turbo Pascal. But since then, it's all been mostly in the C/C++/C#/Java/Obj-C/Actionscript family. I can pickup PHP or Actionscript in a weekend, and have, so no big deal. Just dive in and do a web search. On the weekend do a little reading and you are ready to roll.
I suppose there are so really obnoxious languages but even then you can prototype in your language of choice and port the code.
Agree. Sure, there are some languages with different concepts - functional programming, OO etc - that may throw you a bit if you're not used to them, but my experience is that once you learn a second language it gets very easy to learn the next ones. Programming is programming, and languages is just about syntax for the most part. It took me only a day or two to pick up the essentials and be reasonably productive in both C# and Java, and so far I've had the same with just about any other language I've tried.
That was the phrase I was trying to remember! The old language classifications of imperative vs. declarative and structured vs. unstructured. Now there's also procedural, functional, OO, etc., etc., etc.!
One of the first bits of professional programming I had done was RPG, which was very different from the Fortran and Pascal I learned in school. The job I now have started 16 years ago maintaining COBOL applets for an Informax database, and that was REALLY different. You cannot just start coding with RPG and COBOL: both of these languages have different syntatic sections for app setup and data layout, so you have to organize on a much more fundamental level, and writing something from scratch requires that you start with the entire application in mind before you begin.
First of all, forcing you to use an unknown (to you) language likely means it is an already existing project. At least that was the case for me. I'd like to say I'd answer the first way listed, but reality doesn't work that way.
About 2 weeks ago I was given a task "Add this field to this software" I did, but guess what, scope creep. So bad that the webpage had to be updated, too. Broken, badly architected, badly written, and undocumented ASP with SOAP, etc. I told the requesting party that I do not know how anything about ASP in an attempt to push back the deadline, the response was "well, take a look." This turned into "It's due Friday" (On Wednesday) and finally "It's due by midday today" On that Thursday. I'd love to learn ASP as I went along, but that was impossible with the looming deadline and horrible base code.
"I have a theory that the truth is never told during the nine-to-five hours. "
— Hunter S. Thompson
Of course, if you're going to have to learn the language anyway, you're going to have to write some code examples to see how things work, so they might as well be stuff you're going to use for the project. As you gain experience, you can (usually) go back and improve things later!
This can happen with new projects too . On the first week on my new job I was given a project to build an interface for a telephone server. At this point I was a C++ programmer with zero experience in VB. The head of department then told me that every program in this company is written in VB, so I started learning .
I must admit, VB isn't the hardest language to learn, but I dived in and learned it as I went through the project. Now after 6 years we did a more or less complete redo on the project, to remove the "lessens learned" passages in the code .