I was raised in East Lansing, Michigan. It was a great place to grow up: a college town with good public schools, a beautiful campus, a modicum of diversity, and an active, walkable downtown.

But I came along just a few years too soon (I was born in 1978) to really consider coming out as gay when growing up. There were no openly gay students in my high school. And there were few gay role models in American society: certainly not on television and in the movies, which invariably portrayed gay men as camp characters, or freaks, or AIDS victims.

If coming out was hard to contemplate, however, the possibility of gay marriage was unthinkable. At the time Andrew Sullivan wrote his now-famous essay in support of gay marriage in The New Republic in 1989, almost no polling firms even bothered asking questions about gay marriage. One that did — the General Social Survey — found that just 12 percent of the population was in favor of it.

But today, after a Supreme Court decision, same-sex marriage is the law of the land in all 50 states.

Progress has come remarkably fast. There was no legal gay marriage in the United States until Massachusetts permitted it in 2004. At this point four years ago, only 5 percent of the U.S. population lived in states where gay marriage was legal. And in 2008, not only Republican candidates but also Barack Obama and Hillary Clinton were publicly (if not privately) opposed to gay marriage. On the same day that Obama became the first African-American elected to the White House, voters in liberal California approved Proposition 8, which enacted a constitutional ban on gay marriage in the state.

Today, however, a number of states more conservative than California have voted to approve gay marriage on the ballot. And almost 60 percent of Americans support gay marriage in public opinion polls:

In one sense, the rise in support for gay marriage has been predictable. Since 2004, support for gay marriage has been increasing steadily by about 2.5 percentage points per year. Forecasts that I made in 2009, 2011 and 2012 about the rise of support for gay marriage on state ballot initiatives, which once seemed remarkably optimistic, now seem too conservative.

But it may also be dangerous to conclude that the rise in support for gay marriage has been inevitable. In fact, it’s been an unusual issue. Interracial marriage took much longer to be legalized, by comparison. Public opinion on abortion has been relatively steady for years.

So why has gay marriage been different? Some of it is generational; older voters have gradually been replaced in the electorate by younger ones who are more likely to support gay marriage.

However, many people have also changed their minds. In the next chart, I’ve estimated support for gay marriage by age based on the versions of the General Social Survey conducted in 2004 (when 31 percent of respondents supported gay marriage overall in the poll) and 2014 (when 57 percent did). The rise in support far exceeds what can be explained by generational turnover alone. For example, someone (like me) born in 1978 would have a 45 percent chance of supporting gay marriage as a 26-year-old in 2004. As a 36-year-old in 2014, they’d have a 63 percent chance of supporting it. Probably one-half to two-thirds of the rise in support for gay marriage has been a result of people changing their minds on the issue.

The shift in opinion has had many causes. Some of it has taken place household by household and neighborhood by neighborhood; voters are considerably more likely to support same-sex marriage if they know a gay or lesbian person personally. Meanwhile, gay characters are now much more common, and are portrayed far more positively, on television and in the movies. The hard work of thought leaders like Sullivan (who is a friend of mine) and activists like Evan Wolfson has helped to catalyze the process.

My personal bias is also to think that gay marriage simply has the more persuasive side of the argument. You can argue for it from the point of view of enhancing equality, but also from the standpoint of enhancing liberty. Furthermore, you can make a conservative case for gay marriage, as Sullivan and others have, which champions the role of marriage as an institution that increases family and community stability. (That was one of the points made by Justice Anthony Kennedy in his opinion for the Court on Friday.)

But there’s another lesson about the rise in support for gay marriage that seems less likely to be heeded. It’s that society’s collective moral judgment is highly imperfect and subject to revision. As Paul Graham wrote in the essay “What You Can’t Say” in 2004:

It seems to be a constant throughout history: In every period, people believed things that were just ridiculous, and believed them so strongly that you would have gotten in terrible trouble for saying otherwise. Is our time any different? To anyone who has read any amount of history, the answer is almost certainly no. It would be a remarkable coincidence if ours were the first era to get everything just right.

In the United States, gay marriage has gone from unthinkable to the law of the land in just a couple of decades. Homosexuality has gone from “the love that dare not speak its name” — something that could get you locked up, beat up, ostracized or killed, as is still the case in much of the world — into something that’s out-and-proud, so to speak.

In my view, of course, Americans have gotten the question of gay marriage right. So I’ll be among the 60 percent celebrating the decision tonight.

But as Graham writes, there are any number of issues on which the moral consensus we have today will be regarded as backward by our children or grandchildren. So as you celebrate or commiserate tonight, maintain some humility too. Gay marriage wasn’t the first issue on which society changed its mind, and it surely won’t be the last. What makes it unusual is that the shift has occurred within our generation, fast enough for us Americans to experience it firsthand.