I don't think anyone seriously thinks that learning a computer language is in any way equivalent to learning a foreign language. But it is useful to pretend that it does, so that we don't have to ask the real question: Should everyone be required to study a foreign language in school? My answer is no. I took a year of Latin in high school and hated it, and have never thought about it since. It was a huge waste of tim…
I'm by no means fluent in Spanish (even after taking two years of it in high school), but if at least some of it stuck then I'd say that's better than nothing. Not saying there ain't better ways of getting that education, but it's a start.
I've since found that I rather enjoy a lot of Spanish-language media (especially television and music); I'm - again - nowhere near sufficiently fluent to understand everything, but I know enough to be able to appreciate it instead of writing it off as gibberish.