The world fell on Donald Trump’s head — yet again — when he said in a White House meeting that we should be trying to get immigrants from Norway rather than “shithole” countries in the Third World.

The media has treated Trump’s remarks, made in a heated exchange with senators over a proposed immigration deal, as an explicit confession of racism. Why else would he scorn immigrants from places like Haiti and Somalia, while yearning for those from lily-white Scandinavia?

He was almost surely trying to say that we should pick immigrants for skills (he reportedly mentioned Asia as well as Norway), but typically stated his position in the crudest terms possible.

The ensuing controversy has created a cottage industry of TV and newspaper commentators declaring proudly that they came from shithole countries (Ireland! Russia!), and implying that as long as we are welcoming enough people from distressed countries, our immigration policy is on the right track.

This discussion is largely informed by a romantic view of the experience of the early 20th century, which is, unsurprisingly, not applicable 100 years later.

First, the economy has changed. We no longer can toss low-skilled immigrants into the maw of an insatiable manufacturing sector. “Many of the immigrants who arrived in the early 1900s,” economist George Borjas writes, “got jobs in the booming manufacturing sector. Those manufacturing jobs, which over time evolved into well-paid and stable union jobs, created a private-sector safety net that protected the pay and economic status of the immigrants and their children and grandchildren.”

Even so, Borjas notes that the evidence suggests there was no real improvement over the lifetimes of the Ellis Island immigrants, and initial differences in income among different groups “persisted into the grandchildren’s generation.”

In short, the wave of mass migration a century ago is not a warrant for a thoughtless immigration policy today. The fact is that immigrants from rich countries tend to do better here than immigrants from poor countries, and education level is a key factor.

According to the Migration Policy Institute, nearly half of Asian immigrants are employed in management, business, science or the arts, higher than the proportion of the native born. The median income of households headed by Asian immigrants is $70,000, higher than that of the native born.

The median income of a household headed by an Indian immigrant is an astonishing $105,000. This is largely because their level of education is off the charts. Three-quarters of Indian immigrants have a college degree or more. The Indian immigrants don’t reflect the norm back home, where the average person has less than six years of schooling, but we’re skimming off a more skilled element of the population.

Critics of Trump’s comments rightly point out that immigrants from sub-Saharan Africa, reportedly part of the shithole argument, are doing pretty well here. But it depends on the country. About 60 percent of Nigerian immigrants have a college degree and more than 50 percent work in management positions. In contrast, only 11 percent of Somalis have a college degree and half are in poverty.

The numbers for immigrants from El Salvador, to pick a country also reportedly part of the White House discussion, are less encouraging. According to the Center for Immigration Studies, more than half of Salvadoran immigrants don’t have a high-school degree and half are living in poverty or near it. This doesn’t mean they don’t work hard, or deserve to be insulted, but they are struggling.

We’re blessed to live in a country that many millions around the world want to move to. This affords us the luxury to be more selective in our immigration policy and, like Canada or Australia, establish a system emphasizing skills suited to a 21st-century economy. Some might be from Norway, some might be from s- - -holes — all should be prepared to thrive.