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 .