Compromise is one of those words that’s good in theory, but hard to apply in practice. In theory, it’s marvelous when an ideological opponent chooses to back down, to meet you halfway, to accede to some of your ideas. That’s good compromise; you accept it gracefully.

It’s not so easy when it’s your turn to back down, to meet someone else halfway, to accede to some ideas that are not appealing to you. That’s bad compromise — it’s selling out, it’s opening yourself to charges of hypocrisy. If you give in, you are sullen and mutter to yourself under your breath.

Look at all the bad compromises history shows us! Just looking briefly at American history, how about the Three-Fifths Compromise of 1787? The Kansas-Nebraska Act? The Missouri Compromise? All involved acceding to slavery in some way. All were morally compromised (and that kind of compromise never is good).

There are good compromises too, but they tend to be less glamorous. Basically, though, just about any successful piece of legislation has to involve at least some compromise. (Unless it’s done by one legislator, all alone in a sealed room, but then you get into the tree-in-the-forest argument. Is it really legislation if no one hears it?)

Compromise is the enemy of extremism, which is so much more emotionally satisfying than compromise, and so much more inherently dangerous.

That’s why it was so striking to work on two stories this week, very different stories, from different places, about different issues, where the main concept was compromise and the necessary rejection of extremism that compromise demands. Two stories, that is, about fighting extremism.

Last Wednesday, in a press conference in Teaneck, Josh Gottheimer, the Democratic candidate for Congress in New Jersey’s 5th District, talked about the dangers of extremism. If he is elected, he said, he will reach across the aisle to form coalitions, on an issue-by-issue basis; party loyalty is a good thing, but it is not an overriding good.

He was endorsed by former Connecticut Senator Joseph Lieberman, who has been both a Democrat and an independent, and has endorsed many Republicans. He was endorsed as well by Teaneck’s mayor, Mohammed Hameeduddin, who talked about Teaneck as a nonpartisan municipality. Local politicians do not use party labels, he said. All three men — Mr. Hameeduddin, Mr. Lieberman, and Mr. Gottheimer — talked about the way extremism has taken over politics, and how dangerous that can be.

Meanwhile, Rabbi Dov Lipman, who was born in the United States but now is not only an Israeli but a former Knesset member, has devoted himself to bringing extremists closer to the center. He has worked with charedim, easing them into the world of work, absolutely respecting their religious values and their worldview but helping them to un-demonize their secular compatriots — and at the same time un-demonizing the charedim to those secular Israelis.

We fear, as this year’s grim politics continue to divide and enrage so many of us, that the constant pulling from the fringes, as if the world were a thick rope and the electorate were playing tug of war, it will not end well. Either one side will end up fallen and bruised, piled up on top of each other, resentful and hurting, or the rope itself will snap.

We hope that everyone can listen to the wisdom of Rabbi Lipman, of Mayor Hameeduddin, of Senator Lieberman, and of Mr. Gottheimer. Not all compromise is good, but no compromise ever is very, very bad.