A new kind of language lab. (Terry Hefferman/Apple Computer)

A New Mexico legislator has proposed counting computer programming toward the state’s foreign language requirement for students in public schools, an effort he says will help give children skills they can use in a computer-oriented economy.

The legislation, sponsored by state Sen. Jacob Candelaria (D), would allow students who learn JavaScript, HTML or some other computer programming language to claim foreign language credit. The bill appropriates funding to allow districts to add the new courses.

New Mexico high school students already must take at least one course in a language other than English to obtain a diploma.

“Districts could still teach Latin, French or Spanish, but it provides the incentive for them to incorporate (computer) coding into their curriculum without it being an unfunded mandate,” Candelaria told the Albuquerque Journal.

It’s not a unique idea: Last week, Kentucky’s Senate Education Committee endorsed allowing students to substitute computer programming for foreign language requirements by a vote of 10 to 1. Republican state Sen. David Givens sponsored the measure, he said, to “make room in the curriculum and in the electives to try and drive computer programming closer to the start of that student’s high school studies.”

The goal, both Candelaria and Givens said, is to encourage students to go into the field of computer science, where starting salaries are well above the national average.

Nationally, just 2.4 percent of college graduates received computer science degrees in 2010, according to the National Center for Education Statistics. Computer science degrees peaked in the 2003-2004 school year, when they accounted for 59,488 of about 1.4 million degrees conferred, or about 4.25 percent of all college degrees that year.

U.S. Rep. Tony Cardenas (D-Calif.), a freshman from the Los Angeles area, has introduced legislation in Congress that would provide incentives for school districts that teach computer programming.

Reid Wilson covers national politics and Congress for The Washington Post. He is the author of Read In, The Post’s morning tip sheet on politics.