Divorce attorneys and family advocates are calling the state’s new alimony bill the most dramatic change to family law in decades.

The bill, which was passed unanimously in the House and the Senate, is expected to be signed by Governor Deval Patrick today.

Family law experts and advocates are hoping the new law will make alimony more equitable for both parties in a divorce.

“Our alimony law was so antiquated that there were issues on both sides, for payors and payees,’’ said Denise Squillante, former president of the Massachusetts Bar Association, who represented the organization on the legislative task force. “This a very fair bill that addresses all those issues.’’

The measure adds some consistency to alimony judgments by curbing lifetime alimony payments and providing caps on the number of years a spouse can receive alimony. The legislation also allows judges more flexibility to make determinations based on a family’s specific circumstances.

“It isn’t just a one-shot cookie cutter for every case, and that is very important,’’ Squillante said.

But not everyone is happy about the bill.

Gerald Nissenbaum, a Boston-based divorce lawyer who is the former president of the International Academy of Matrimonial Lawyers, called the bill “mean-spirited and Draconian,’’ because the limits it puts on alimony are “too strict.’’

Nissenbaum said he fears the bill will be detrimental to recipients of alimony whose sacrifices in a marriage are not reflected by the law.

Additionally, he said, the bill’s wording allows lawyers too much room for interpretation when the new law is applied to already-decided cases.

“Whether you like the bill or not, it should be done in a way where the language is clear, the terms are clear, and designed in a way to avoid a lot of litigation.’’

Previous alimony reform bills failed to garner a pass from state legislators. Then, in 2009, the state appointed a broad cross-section of family law attorneys and advocates - who often had strongly differing viewpoints - to work on a legislative task force and debate the shortcomings of Massachusetts’s alimony system.

They quickly came to a surprising conclusion: Everyone in the room seemed dissatisfied with the current law and eager to forge a new one.

“We discussed all the points, and we came up with a result that all of us could get behind,’’ said Kelly Leighton, a divorce attorney who works out of Salem and was a member of the task force. “It was a remarkable outcome, when you think about how different we all were when we walked into the room.’’