I learn a language by writing a compiler in it - I have a language called Tyke which I first wrote the compiler and runtime for in SPL (a dialect of PL/1 on Prime computers) then wrote it in C, then C++ and now C#
At the time I was very comfortable with C, C++, Assembler, Basic, Pascal, HTML and several database support languages then they wanted me to write in Perl. It is just another language, I thought, all you need is the syntax; what I did not know at the time is that Perl is all syntax. Now that was a learning curve but huge fun. Perl of course is a write only language and now ten years later, surprise surpise, I have forgotten it all but I treasure the memory and it was an interesting project.
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