Hillary Clinton and Bernie Sanders differ on how to get things done.

Clinton has billed herself as a pragmatist, willing to take the compromises that are available. Sanders, meanwhile, has positioned himself as an idealist more interested in reinventing the system than in slightly improving it.

This dynamic became clear again during Thursday night's Democratic debate on PBS and CNN, when Clinton went after Sanders for opposing a 2007 bill that would have bolstered border security and given millions of undocumented immigrants some form of legal status.

"I voted for comprehensive immigration reform in 2007. Sen. Sanders voted against it at that time," Clinton said. "I think we have to get to comprehensive immigration reform with a path to citizenship."

Sanders countered: "The Southern Poverty Law Center, among other groups, said that the guest worker programs that were embedded in this agreement were akin to slavery. ... Akin to slavery — where people came into this country to do guest work were abused, were exploited."

What makes this dispute so interesting is that Clinton and Sanders don't disagree all that much on the overarching goals of the legislation. Both wanted to give undocumented immigrants legal status and create a path to citizenship. Both voted to reduce the proposed size of the controversial guest worker program.

But where they disagree is on strategy. Sanders fiercely opposed any legislation he viewed as exacerbating income inequality. Clinton wanted to get a reform bill done — which, given the political configuration at the time, meant business-friendly provisions to attract Republican votes.

What was the guest worker immigration proposal?

The 2007 immigration reform bill was enormous, and it originally included a provision to create a new form of visas — to be called "H2C" or "Y1" visas — that would have given guest workers the legal means to work in the country year-round.

Advocates acknowledged that the proposal wasn't perfect. But this new program would have given Mexican migrants making dangerous border crossings the opportunity to safely and legally enter the United States, said Tamar Jacoby, president and CEO of Immigration Works USA.

"If you're a Mexican and want to work here year-round and don't have family, there's no legal way for you to come here," Jacoby said in an interview. "These visas would have created a program like that."

Still, the expanded guest worker program had opponents. Among them were hard-right conservatives, who saw the visas as a Trojan horse for amnesty, and unions, who worried that the influx of low-income workers would hurt blue-collar Americans.

These groups allied with one another and successfully pressured Congress to scale back the scope of the visa program. Both Clinton and Sanders voted to cut the number of these visas in half, and then also voted to attach a "sunset clause" that would automatically phase out the program after five years, according to Jacoby.

Where Clinton sought compromise and Sanders did not

For many Democrats, this stripping down of the bill's new guest worker program was enough to get them to support the overall immigration reform package.

Clinton was one of them. She ended up joining 22 other Democrats, including then-Sen. Barack Obama, in voting both to weaken the Y1 visa program and for the final immigration reform package. For Sanders, it was not. He voted against the final bill, which failed by a small margin.

Jacoby argues Sanders's vote against the bill illustrates just how far the Vermont senator is from the Democratic mainstream.

"To make it only a five-year thing — that's basically eviscerating it. It's like saying we're going to invent the steam engine and then destroy all the steam engines that exist," Jacoby said of the cuts to the original visa proposal. "For most people, that was enough."

Why Sanders opposed the guest worker program

Still, you can also understand why Sanders felt he had to oppose the bill even after it had scaled down the guest worker program.

For one, the "akin to slavery" quote isn't made up: The SPLC did publish a report in 2007, "Close to slavery: Guestworker programs in the United States," that likened the existing H2A and H2B guest worker programs to modern servitude.

The report looked at the conditions of about 121,000 guest workers living in the United States — including those in forestry, agriculture, and seafood preparation — and found high fatality rates, lack of basic medical care, and few means of redress.

"It is such an appalling program in terms of the power disparity between worker and employer," said Mary Bauer, the report's author and the executive director of the Legal Aid and Justice Center, in an interview on Friday. "That's just too much power for an employer to hold."

The report adds: "Guestworkers do not enjoy the most fundamental protection of a competitive labor market — the ability to change jobs if they are mistreated. If guestworkers complain about abuses, they face deportation, blacklisting or other retaliation."

Of course, the proposed Y1 visas would have been different from the existing programs the report criticized. But all three are essentially guest worker programs — and if your primary concern is income inequality, some experts argue all of them risk exacerbating that trend.

This cuts to a fundamental part of Sanders's worldview: that what's needed is a "revolution" that reinvents politics, not piecemeal compromises that perpetuate wealth inequality.

Clinton supporters might respond that failing to compromise has made it more difficult for millions of Mexican immigrants to work in the US. And they'd probably be right.

But Bauer, the author of the SPLC report, gave a response that would probably more closely echo Sanders. (Bauer emphasized that her organization is not commenting on the presidential race, just the policy issues.)

"I think it's a false choice: Is it better to deport 10 million people or 11 million people or make people have short-term visas that tie them to potentially abusive employer?" Bauer said. "That's also wrong, and neither is how we should structure our immigration system."