Democratic Gov. Tom Wolf signs legislation designed to reduce long-term public pension costs, in the Pennsylvania Capitol on June 12. (Marc Levy/ASSOCIATED PRESS)

THE EASIEST thing for any government to do is to give the voters what they want today, and worry about paying for it tomorrow. That basic tendency explains much of the process that landed Puerto Rico in the equivalent of bankruptcy. Illinois, New Jersey and Connecticut have trod a similar path of least political resistance en route to financial trouble, albeit not as dire, yet, as the mess in Puerto Rico.

And so it is heartening to see that at least one major state has decided to take a long-term approach: On Monday, Pennsylvania Gov. Tom Wolf signed a pension reform law that will help the state appropriately compensate its future employees while reducing risks to its taxpayers. Even better, the measure is the product of a bipartisan process that brought Mr. Wolf, a Democrat, together with the Republican-dominated state legislature. When it goes into effect 18 months from now, the law will abolish standard defined-benefit pensions for new state and public school employees (except for those on hazardous duty, such as state troopers). Those public employees will have to choose from three retirement savings options similar, in varying degrees, to the defined contribution plans common in the private sector. Among other benefits, this could make retirement savings portable for many who may only work for Pennsylvania for a few years before moving on.

Pennsylvania had already acted in 2010 to put the state’s pension funding ratio, which as of 2015 stood at an unsatisfactory 56 percent, on an upward trajectory. In combination with that past enactment, the new one, which also aims to reduce bloated investment costs, could render the state less vulnerable to unexpected costs in a downturn. To be sure, the benefits will only appear over a period of years; state and local government in the Quaker State will continue to face brutal competition between pension costs and the costs of vital public services in the meantime. Yet analysts at the Pew Charitable Trusts praise the plan as “one of the most — if not the most — comprehensive and impactful reforms any state has implemented.”

It bears repeating that this has been accomplished on a bipartisan basis, showing that the cause of problem-solving is not altogether lost in American politics. Now it remains for other states to follow Pennsylvania’s example.