The Second Amendment guarantees the “right of the people to keep and bear arms.”

But which people? And what arms?

Not everyone in America can own a gun. Minors are prohibited. So are people who have been convicted of felonies or misdemeanor crimes of domestic violence. So are people who have been found by a court to be a danger to themselves or others because of mental illness.

And whole categories of weapons are either banned outright or so highly regulated that they might as well be. You’d face up to 10 years in prison for possessing a machine gun, for example, unless you’d obtained a special federal license and paid a hefty tax.

The line between the sweeping language of the Constitution and the nitty-gritty fine print of the laws is nowhere near as formidable as gun-rights advocates would have you believe. Like most rights, firearm ownership can be legally limited without getting anywhere near a constitutional violation.

The latest evidence of this comes from the District of Massachusetts, where a federal judge has upheld the state’s ban on military-style “assault weapons” and high-capacity magazines.

Quoting a leading authority on the issue, District Judge William G. Young wrote that the Second Amendment “is not a right to keep and carry any weapon whatsoever in any manner whatsoever and for whatever purpose.”

Those words were written not by some teenagers in Parkland, Florida, but by Supreme Court Justice Antonin Scalia in his landmark 2008 opinion District of Columbia v. Heller, which established the Second Amendment as an individual right, a historic victory for gun advocates.

And Young is not some Massachusetts liberal who is trying to turn Scalia’s words against him: Young was appointed to the bench by President Ronald Reagan, and uses Scalia’s trademark “original intent” analysis to say that the assault weapons ban passes constitutional muster.

A similar law was upheld by a federal court in Maryland last year. That’s significant because without a conflict in the lower courts, a case like this is unlikely to come to the Supreme Court, making these precedents the law of the land.

And it also matters because it shows how empty so much of our debate over gun regulation has become. One side keeps screaming that the case is closed and there is no room to debate a constitutional right, refusing to engage in any meaningful give and take. Every small step to reduce gun violence is painted as the first in an inevitable march to the elimination of all gun rights.

Rulings like this show how hollow that rhetoric really is. The Constitution cements a right to bear arms, but it leaves plenty of room to argue over what that means in practical terms.

In his opinion, Young wrote that assault weapons and high-capacity magazines are “beyond the scope of the Second Amendment,” and declares that questions about whether or not to regulate them belong in legislatures and the Congress, not the courts.

“Americans are not afraid of bumptious, raucous and robust debate about these matters. We call it democracy,” he wrote. “Justice Scalia would be proud.”

Indeed.