Former President Barack Obama didn't mention his successor or congressional Republicans by name in a speech before a Bill and Melinda Gates Foundation conference Wednesday, but his message about their attempts to dismantle the Affordable Care Act was clear.

As Republicans attempt a last-ditch effort to repeal and replace the Affordable Care Act, the former president said he recognizes the ACA as passed "was full of things that still need to be fixed." But when he sees attempts to undo that legislation "without any demonstrable economic or actuarial or plain, common-sense rationale, it frustrates," Obama said. The ACA passed under Obama's leadership in 2010 and is widely seen as his greatest legislative achievement.

The foundation set up the Goalkeepers event in New York to highlight progress in fighting poverty and disease around the globe.

Get Breaking News Delivered to Your Inbox

"Thousands upon thousands of Americans threw themselves into the collective effort of reforming our health care system. Those of you who live in countries that already have universal health care are trying to figure out, 'What's the controversy here?' I am too," Obama said, to resounding applause.

The former president described how it wasn't just "policy wonks" who informed the ACA, perhaps better known as Obamacare, but also parents and people with preexisting conditions and crushing medical bills.

"And for the first time, more than 90 percent of Americans know the security of health insurance," Obama continued. "Paying more for insurance of being denied insurance because of a preexisting condition or because you are a woman, that's not a thing anymore. We got rid of that. And people are alive today because of it, and that's progress."

"Now, the legislation that we passed was full of things that still need to be fixed," Obama added. "It wasn't perfect, but it was better. And so, when I see people trying to undo that hard-won progress for the 50th or 60th time, with bills that would raise costs or reduce coverage, or roll back protections for older Americans or people with preexisting conditions — the cancer survivor, the expecting mom or the child with autism, or asthma, for whom coverage once again would be almost unattainable — it is aggravating. And all of this being done without any demonstrable economic or actuarial or plain, common-sense rationale, it frustrates."

"It may be frustrating that we have to mobilize every couple months to keep our leaders from inflicting real human suffering on their constituents," Obama continued. "But typically, that's how progress is won."

The former president also expressed his discouragement about the broader political climate too, lamenting the "rise of nationalism and xenophobia" that have historically prohibited progress.

But he also encouraged the audience to stay away from the "cynicism" fed through Twitter and television, noting how much social progress has been made in a relatively short period of time. The former president's speech, aside from his remarks hinting at the perceived failures of the current administration and Congress, were largely optimistic.

"I was born at a time when women and people of color were systematically, routinely, excluded from enormous portions of American life," Obama said.

Since then, much has changed, he said.

"All of this has happened in such a steady march that sometimes we have a tendency to take it for granted," Obama said.