Editor's note: Andrew Roberts is the author of "The Royal House of Windsor," among many other books.
(CNN) -- The news that Catherine, Duchess of Cambridge, is pregnant is being celebrated throughout Britain, the British Commonwealth and beyond. As well as wonderful news for the royal couple, it has positive implications for the future of the British monarchy.
It means that the reigning House of Windsor will have, for the first time since 1894, no fewer than three generations in line to the throne at the same time. As early into this century as we are, it effectively means that the succession is secure even into the next one.
Whether the royal couple's new baby is a boy or a girl, he or she will ascend the throne as monarch one day, come what may -- short of a republican revolution. The Commonwealth changed the law this year, meaning sex discrimination will end and males will not be favored over females, as they have been for the past thousand years.
Although we can't know what the child's name will be, we can be sure that he or she will have a lot of them: Some heirs to the throne had as many as seven or eight. Should they have a girl, it would be surprising if the names Elizabeth, after her great-grandmother Queen Elizabeth II and great-great-grandmother Queen Elizabeth the Queen Mother, and Diana, after her paternal grandmother, are missing from the list.
Yet the bookmakers' predictions for a boy's name -- Charles, at 10 to 1; and John, at 8 to 1 -- are very unlikely. Charles is already taken as the name of Prince William's father, and John was one of the worst kings in British history.
Any concerns that Prince Harry might one day have ascended the British throne -- he was third in line and will soon be fourth -- have been allayed by this announcement. Granted, he was a brave soldier who saw action fighting against the Taliban in Afghanistan, but he was not really considered suitable material for a king. The knowledge that Catherine can have children removes the danger that a future King Harry might embarrass the nation with his naked hijinks and Las Vegas antics.
What we do know is that the child will be brought up in the harshest of media spotlights and will remain in its full flood for a lifetime. Bookmakers already are taking bets on the color of the baby's hair.
To exist in this gilded cage will require a firm sense of self and a strong personality. Many people might be hurt psychologically by the relentless publicity accompanying every move they make, but Prince William has demonstrated that such attention does not necessarily lead to problems.
The British state is far more protective toward its royals than it was in the days of Prince Charles and Princess Diana, and it is fully conscious of the disasters that can arise when the paparazzi are in full pursuit. The public, too, despises those who invade the younger royals' private lives, although admittedly that has not stopped people from buying the newspapers and visiting the websites responsible for the worst excesses.
In a sense, all monarchy is a lottery, in that nobody can tell whether a sovereign will turn out well or ill. A large number of the best ones -- Elizabeth I, Queen Victoria, George V, George VI, Elizabeth II -- were not necessarily going to be king or queen when they were born.
Some who were born to be king -- such as Edward VIII, later Duke of Windsor -- turned out to be disappointments. With Elizabeth II, Britain won the lottery, and it seems as though the present popularity of the monarchy itself, which opinion polls show to be at its highest in more than a quarter-century, is very much down to her and Prince William.
Although 1992 was an "annus horribilis" for the queen, when Windsor Castle suffered a terrible fire and two of her children's marriages collapsed, 2012 has been a wonderful 12 months, more than making up for it two decades later.
The Diamond Jubilee was spectacular, proving yet again how much the British people love her. The London Olympics were a huge success. And the future of her dynasty seems on the verge of being confirmed throughout this century and beyond.
There will be talk, inevitably, of whether the queen or perhaps the future King Charles III might abdicate, to avoid a situation in which the next three monarchs will be advanced in years. This will not happen.
If the queen has inherited her mother's longevity, she will easily beat Queen Victoria's time on the throne, and become -- in September 2015 -- the longest-reigning monarch in history.
Abdication is not in her job description: She considers it a dereliction of duty, something that disgraced her uncle King Edward VIII with the family. If she lives as long as the Queen Mother, she will still be on the throne in 2027, which will almost inevitably mean that her successor King Charles III would have one of the shorter reigns, as he would be nearly 80 when he acceded.
Arguments about elderly monarchs have been made before in the reign of Queen Victoria, yet it didn't prevent the present queen coming to the throne aged only 25 only half a century later, after the deaths of three more monarchs in the meantime.
Part of the lottery of monarchy is that one cannot predict the future, and the job only makes sense if it is for life. One of the strengths of having a family serve as successive heads of state is that when a bad chapter ends, a better one can begin.
With the birth of what would have been her first grandchild, the shade of Princess Diana's era is forever behind the House of Windsor, and the British people can look forward to a new generation of royals. Small wonder that Britain and the world are celebrating with William and Kate.
Follow us on Twitter @CNNOpinion
Join us on Facebook/CNNOpinion
The opinions expressed in this commentary are solely those of Andrew Roberts.