Gabriela Fore, 6, of Upper Darby Pa., holds a sign with her moms in front of the Supreme Court in Washington, Wednesday, March 27, 2013, as the court heard arguments on the Defense of Marriage Act (DOMA). (Carolyn Kaster/AP)

I’m not gay. But I am jealous. How did homosexuality shift in public opinion from less respectable than atheism to more? And what can the atheist movement learn from the LGBT movement?

The psychiatric community considered homosexuality a mental disorder until 1974, and it wasn’t until 2003 that the U. S. Supreme Court declared sodomy laws (same-sex sexual activity) unconstitutional.When the public is polled about a willingness to vote for a well-qualified person for president who happens to be gay or atheist, gays are now ranked ahead of atheists.

The most obvious and effective lesson atheists are learning from gays (including all LGBTs) is to come out of the closet. Attitudes toward gays changed rapidly when people learned that their friends, neighbors, and even family members were gay. Attitudes about atheists are slowly changing as atheists are slowly coming out.

Gays are more likely to come out publicly because it’s easier for atheists to remain in the closet. There aren’t many excuses to give your mother (or anyone else) about why you’ve been living for years with someone of the same-sex and not dating.

Like most Americans, I gave little thought to fundamentalist, soul-saving Christians until they began to focus on politics. I’ve never been a closeted atheist, but I was an apathetic atheist for most of my life. While a graduate student in New York and later a math professor in Massachusetts in the 1970s, my friends and I had more important things to discuss than religion. For instance, our sex lives. Most of my friends were probably apathetic atheists, and some of them, unfortunately, felt the need to be closeted gays.

The LGBT movement deserves enormous credit for framing and publicizing their issues, forming a big tent that allows for cooperation between activist and laid back gays, and developing a well-organized community with a constituency recognized by politicians. And so it should be with atheists, which is a goal of the Secular Coalition for America and its member organizations.

At a Human Rights Campaign meeting about fifteen years ago, I mentioned that most in the atheist community openly backed gay rights and wished the gay community would reciprocate. “After all,” I said, “the same religious-right people who object to us also disapprove of you.” A number of gays acknowledged privately that they were atheists who wished to remain quiet about it because they were trying to appear “normal” in our culture. Continued LGBT successes are making it easier for gay atheists to emerge from both closets.

An evidence-based case can be made for why many religious people are less accepting of atheists than gays. Most aren’t worried about homosexuals “converting” heterosexuals, but they worry about hearing sound arguments from atheists that might resonate with their flock. You’re much more likely to stay with your childhood religion if no one ever questions those beliefs.

And then there’s marriage. After “living in sin” with me for 10 years, Sharon thought we were getting too old to be called boyfriend and girlfriend, and suggested we marry. I argued that if it ain’t broke don’t fix it, and also that we should boycott marriage because gays couldn’t marry. Despite my weak counter arguments, we married at 12:01 AM on January 1, 2000.

I’ve been happily married for thirteen years, and neither of my arguments would work today. I expect that the next generation will look back and wonder why there had been such a fuss over gay marriage. Even conservative religionists will probably find ways to reinterpret their holy books.

I still don’t like the “institution” of marriage because I don’t think the government should play an official part in a couple’s relationship. But if opposite-sex people can marry, then so should same-sex people. And if religious people can become president, so can atheists. Maybe someday our president will be an openly gay atheist.

Herb Silverman is founder and President Emeritus of the Secular Coalition for America, author of “Candidate Without a Prayer: An Autobiography of a Jewish Atheist in the Bible Belt,” and Distinguished Professor Emeritus of Mathematics at the College of Charleston.