President Trump said he might pursue an immigration policy that skews permits toward high-skilled workers according to language proficiency, educational and professional background, and age. He is not the first U.S. president to espouse this idea.

President John F. Kennedy pushed for something similar, but under President Lyndon Johnson the view that family reunification should play a larger role led to the 1965 watershed law partly responsible for the shift in immigrant origins from Europe and Canada to Latin American and Asia.

High-skilled immigration is more palatable, politically speaking, than low-skilled foreign workers. But such a policy does not necessarily reflect the needs of the economy. It sets politically acceptable quotas and then picks the immigrants to fulfill them. Because low-skilled immigration is indispensable, it causes supply and demand for low-skilled workers to interact outside of the law.

With a need for less-educated immigrants, Australia has seen a big influx of low-skilled workers using other types of visas, such as (ironically) international student or working holiday visas. In Canada, where provincial governments play a significant role in immigration, federal restrictions on low-skilled visas have had unintended consequences. Among them, a constant tension between the provinces that need low-skilled workers and the federal government, which has had to raise caps and accept less-skilled workers through various visa arrangements.

An economy needs highly trained workers but also people willing to perform other activities. Just as internal migration adjusts the asymmetries between states, international migration adjusts differences between countries. Foreign workers lift the economy at all levels. Economist Benjamin Powell has estimated the net benefit of immigration to the economy to amount to more than $36 billion.

The job market has an ability to adjust itself that no government has. Between 2007 and 2009, undocumented entries were less than two-thirds of those between 2000 and 2005 because of the recession. In recent years, net immigration from Mexico has been negative.

Is it realistic to expect a points-based merit system to keep away all the low-skilled immigrants needed in the U.S.? Only a super-efficient police state could accomplish such a task—at a terrible cost to the country.

Ultimately, the less the disconnect between the law and reality, the fewer undocumented immigrants there will be.