I am probably unusual in that I have both worked as a teacher of foreign languages and as a computer programmer. The key here is, "What is a foreign language?". In the US, Spanish is designated a "foreign language" in most school districts. There are even areas where Spanish is the dominant language and Spanish is designated a "foreign language". Many of my colleagues and I have argued that we should be teaching a "second language" rather than a "foreign language". The distinction is small, but important. Foreign language teaching is aimed at teaching a language which is not in use near the student. The student doesn't have ready opportunities to acquire the language through their own efforts and must rely on the teacher to provide everything in the classroom.
Teaching a "second language" (or third or fourth -- "second" is a technical term that refers to any language that is not your primary language) is focussed on teaching the student skills to acquire language under the assumption that they have the means to act on their own initiative. It assumes that the language is accessible in some form to the student outside of the classroom.
I am not in favour of forcing students to learn "foreign" languages in high school. This pretty much guarantees that the majority of students will have difficulty finding any relevance for the subject in their lives. There are benefits, to be sure, but those benefits are aimed squarely at only a handful of students who already have an interest in foreign countries, etc. I would vastly prefer helping students with the mechanics of language acquisition and leave it up to them to explore ways in which they use the language (watching foreign TV/films, reading foreign books, talking to people on the internet, listening to foreign music). In fact, in my classes I avoided overt cultural references as much as possible, while encouraging my students to pursue whatever interested them outside of class.
From that perspective, I fully support the idea of teaching programming as a "second language". I actually teach programming using the language acquisition techniques that I learned as a language teacher. Don't worry, it's not the "Memorize a million words of vocabulary and try to fit it into arbitrary grammar rules" style of teaching. I teach programming as an application of language acquisition and it is extremely effective. Computer languages are very small and simple. Programming idioms are also (by and large) few and logical. In my opinion, this is a great first step before tackling a human language. Once you get the language acquisition techniques down (which aren't particularly difficult or numerous), it is easy to apply to a more difficult problem.
On the other hand, I have sympathy for those teachers who truly want to teach foreign languages for the benefits that they bring. I just feel that such classes should not be required for all students.