Sen. Tom Cotton (R-Ark.) arrives for a weekly Republican Party luncheon at the U.S. Capitol on Jan. 17. (Jonathan Ernst/Reuters).

Sen. Tom Cotton (R-Ark.) last week helped kill the bipartisan immigration deal in Congress. He didn't think the bill went far enough in transforming the U.S. immigration system. Like President Trump, Cotton thinks the United States should cut legal immigration. The senator's reasoning?

Well, part of it seems to be that robots are coming for our jobs.

“It can't simultaneously be true that robots will take all the jobs & that the West needs millions of new immigrants to do the grunt work,” tweeted Cotton in late January, quoting a Wall Street Journal op-ed from a conservative commentator.

The senator repeated that argument last week when a reporter at Vox asked him why he is so adamant about cutting legal immigration, a big shift from the GOP's traditional stance of accepting legal immigrants and fighting only illegal immigration.

“I think it’s certainly critical that we reduce unskilled and low-skilled workers. It can’t both be true ... that we need both more unskilled and low-skilled workers, but robots are going to take all the jobs,” Cotton told Vox.

The connection among immigrants, robots and the labor market hasn't been widely discussed. It's an argument about the future. Typically, people who favor restricting immigration look to the past and present, arguing that immigrants have taken the jobs of low-skill Americans or depressed their wages. There is almost no evidence to support such a claim. In fact, unemployment in the U.S. is 4.1 percent, the lowest since 2000, and businesses say their top complaint is they can't find enough workers for the 5.8 million job openings that currently exist.

Almost every economist (on the left and right) says we need more immigration right now, not less, especially as America's population is aging, meaning there will be even fewer native-born workers in the coming years.

“You've clearly got a serious demographic problem in the United States,” said Desmond Lachman, a fellow at the right-leaning American Enterprise Institute. “The number of people over 65 will double between now and 2060. That's clearly a problem. You need younger people in the workforce to support a whole lot of older people.”

But what about the robots? Plenty of studies predict machines will disrupt entirely industries. Driverless cars and trucks, for example, could put 4 million Americans out of work in the “near future,” predicts the Center for Global Policy Solutions.

In this context, the robot argument sounds compelling. Do native-born Americans need to compete with immigrants for jobs that are going to be increasingly rare because of automation? On closer examination, it's unlikely this is a real worry, several economists said.

Yes, machines will almost certainly take over some jobs, but that doesn't mean there will be fewer overall jobs in the U.S. economy.

Heidi Shierholz, an economist at the left-leaning Economic Policy Institute, put it this way: “There will be people who get hurt by automation, but we have zero evidence it will actually reduce the overall number of jobs in the economy.”

First, the United States doesn't have enough workers to fill jobs. That's expected to get worse. The country currently has nearly 6 million job openings, almost one for every unemployed person. The problem is not all the unemployed live where the job openings are or can pass drug tests.

These problems are expected to get worse as the U.S. population continues to get older and more people retire. Mark Zandi, chief economist at Moody's Analytics, has made the case that U.S. productivity has been lagging partly because of the aging workforce, and demographics are going to continue to be a drag on the U.S. economy for the next 30 years unless the United States allows in more immigrants and finds ways to better retrain older workers.

“In the real world, the problem is we can't find workers. That's getting worse by the day. The problem isn't robots taking over our jobs,” Zandi said.

Even though U.S. businesses are desperately seeking workers, the Cotton proposal would reduce immigration an estimated 40 percent by 2039, according to an analysis by the libertarian Cato Institute.

Second, history suggests new jobs will replace old ones. As the Industrial Revolution demonstrated, technological transformations create new jobs no one has thought of yet. The same trend appears to be happening today.

Companies shed workers during the Great Recession and rapidly tried to cut costs, including by introducing more machines on assembly lines and in fast casual restaurants like Panera, where you can now order on a touch screen. Yet even with those trends, the U.S. economy has added more than 16.4 million jobs since the low point for employment in December 2009.

“Tom Cotton is woefully misinformed,” said Joe Brusuelas, chief economist at RSM. “Robots will create more jobs.”

Brusuelas points out that many of the fastest-growing jobs today, such as “user design” and “cloud engineers,” weren't around a decade ago. We like to talk about how robots kill jobs, but we tend to talk a lot less about how many other jobs are being created in the economy.

Third, there are a lot of jobs robots can't do. We like to think of machines like the super-robots we know from movies like “Transformers” that can do all that humans can do and then plenty more. But the reality is that robots aren't nearly that sophisticated yet.

“There's something known as Moravec's paradox, which is the idea that it's much easier for computers and AI to do high-skilled work like accounting than it is to tell a computer to do low-skilled work like tidying up a room,” said Alex Nowrasteh, an immigration policy analyst at the Cato Institute. “If that remains true, there will be a lot more opportunities for low-skilled work.”

Fourth, immigrants won't come if the country has no jobs. Cotton and Trump may forget that, by and large, free market economics works. If the dystopian future comes to pass and robots do create mass unemployment in America, then immigrants will stop coming. That is exactly what happened during the Great Recession. As jobs dried up in the United States, Mexicans stopped coming across the boarder.

“The best immigration policy is to let the market determine how many workers are required, not to have Congress try to anticipate what future tech trends will be based on science fiction-like scenarios,” Nowrasteh said.

He thinks it's especially odd Republicans are trying to “choose winners,” something the GOP has typically argued is a mistake (and more like Democrats).

Fifth, limiting legal immigration typically causes more illegal immigration. If there are still jobs to be filled and there aren't enough American workers and legal immigrants to do those jobs, then illegal immigration tends to pick up. There's widespread agreement across the aisle that is what we don't want, politically or economically.

Princeton professor Douglass Massey points out that when the United States clamped down on legal immigration from Mexico in the 1960s (the bracero guest worker visas), a period of booming economic growth, illegal immigration picked up. Undocumented immigrants tend to be the ones working for extremely low pay since they don't have rights to fight back.

“You can easily be exploited if you're an undocumented immigrant. That pushes down wages of authorized workers,” Shierholz said. “You can solve that by bringing all workers out of the shadows.”

To sum up: Economists pretty uniformly agree that efforts to limit legal immigration could hurt the U.S. economy for years to come. They don't think the rise of robots is a reason to reconsider our immigration policy now.

But economists do think Trump and Cotton have a point to reexamine who gets one of the 1 million legal visas a year. Moving to a merit-based immigration system like Canada's and Australia's could make a lot of sense — and help bring in workers with whatever skills the United States needs at any given point. Today's immigration system places a lot of emphasis on family connections and bringing people in from countries that are underrepresented in the United States.

“It's fair to talk about what kinds of immigrants you want,” said Lachman of the American Enterprise Institute. “A points based system like Australia would make a huge amount of sense, but I don't think one should be talking about limiting immigration overall.”