Looking at the candidates at the first Republican debate last August, few would have predicted the rise of Donald Trump and the fate of the 16 other people on stage with him. But perhaps we should have: Trump was riding what turned out to be the dominant issue of immigration.

Looking at it another way, however, perhaps we were entitled to discount Trump’s chances. He wasn’t your typical candidate, and if no one else was talking about immigration, maybe it wasn’t such a big issue after all. For years, the press had told us that the real crisis was our failure to give amnesty to illegal immigrants, and among the Republicans some of the weak sisters fell for it.

But all this raises a question. About 15 percent of the people here (including illegals) are foreign-born, but it’s 20 percent in Canada and 25 percent in Australia — the true immigration country. There are simply a lot more immigrants in those countries, and it’s not an issue there. So why is it such a big deal here?

I don’t know about Australia, but I can talk about Canada, since I’m originally from Montreal and I’m a dual citizen. That gives me a very different perspective. I can talk about things Americans don’t have a clue about. Bagels, for instance.

Or immigration. If that’s not an issue in Canada, there’s a very simple reason. What Canada has is an immigration system Donald Trump would love.

You know what they do with illegals there? They put them on a plane and send them home. It’s not even controversial. Look, they’re not here legally so let’s enforce the law.

And that’s not even the major difference between the two countries. However bad the illegal immigration problem might be here, the legal immigration system is worse, easily the dumbest in the world. It’s so bad that the United States admits 50,000 people a year just because they’ve won a lottery. No screening whatsoever.

Cretinism doesn’t descend any lower.

The big difference between the two countries is in the preference Canadians give to immigrants who are going to make native Canadians better off. What that means is that Canada admits a lot more people on the basis of economic merit.

What it wants are people who are going to start out as givers, not takers. It’s wrong to distinguish between American givers and takers, but it’s just fine to distinguish between would-be immigrant givers and takers.

Canada prefers younger immigrants, people who are educated, people who want to go to places where there are labor shortages, people who are going to start businesses in Canada and hire Canadians.

In absolute numbers, Canada actually admits more immigrants under economic categories than the United States does — about 160,000 a year in Canada versus 140,000 a year here. Remarkably, a country one-tenth the size of the United States takes in more people who promise to make the native-born better off.

By contrast, the American system is geared toward family reunification, which systematically advantages countries from which recent arrivals have emigrated. In other words, Mexico and not Ireland.

Now don’t get me wrong. Family is important. But in an age of Skype and cheap airfare it’s not like the old days. Back then, it used to be the long goodbye when you left the old sod. Now it’s anything but, and I say this as one who used to visit my mother in Canada six times a year till she passed away (at age 104).

Trump says he wants a wall to keep out the illegals, but one with a big door for immigrants who are going to make Americans better off. I’m waiting for the details, but if he’s looking for a model he could do worse than look to the Great White North.

I can hear people objecting that I’m a little short on compassion. I have an answer for them. People who want to admit immigrants who will make Americans worse off aren’t showing compassion for the illegals. They’re showing a lack of compassion for Americans, and a desire for cheap maids and gardeners.

Besides, when you have sensible policies for regular immigrants, you can then have a generous refugee program, as Canada does. Start caring a bit more about our own people, and America’s legendary compassion for others will come roaring back.

Almost the worst thing I can say about America’s immigration system is how the best instincts of the most generous people in the world are stifled when they have reason to think that their country’s elites despise them.

F.H. Buckley is a professor at George Mason Law School and the author of “The Way Back: Restoring the Promise of America.”