Martin Rees is Britain’s astronomer royal and the author of “On the Future: Prospects for Humanity.”

As an astronomer, I have looked deep into space at countless celestial bodies, but I am like anyone else when I glance at the night sky, see the moon and think with awe of Neil Armstrong and Buzz Aldrin — and of the day, July 20, 1969, when they left the first footprints on its dusty surface.

The exploit seems even more heroic in retrospect when we realize how “primitive” the technology was. As has been noted more than once lately, on the eve of the moon landing’s 50th anniversary, NASA’s entire suite of computers was less powerful than a single smartphone today.

The Apollo 11 lunar mission itself came 50 years after the first transatlantic flight (Newfoundland to Ireland) by British aviators John Alcock and Arthur Brown. The Apollo mission followed the Soviets’ first Sputnik flight by only 12 years. Had the pace of advance in aerospace technology been sustained in the half-century since Armstrong’s “giant leap for mankind,” there would surely have been footprints on Mars by now.

That hasn’t happened, though. And maybe it is just as well. I am unconvinced that there is even a need for fresh footprints on the moon. Despite considerable talk lately by the Trump administration about returning to the moon, the practical case for such a mission becomes ever less tenable with each new advance in robotics and miniaturization. Leave manned flight to private entrepreneurs, if they wish to bankroll such adventures.

The funding for the Apollo program was forthcoming, of course, only because of the U.S. strategic imperative to “beat the Soviets.” Once primacy was achieved, justifying the necessary gargantuan spending for the Apollo missions eventually became impossible.

In the decades since the last Apollo mission, in 1972, the development of space technology has nonetheless flourished. We depend routinely on orbiting satellites for communication, GPS navigation, environmental monitoring, surveillance and weather forecasting. Unmanned probes have journeyed to all the planets of the solar system. Several countries in addition to the United States, including China and India, now have programs that promise to extend our reach into space.

But should there be a role for humans? There’s no denying that NASA’s recently landed InSight, surveying the Martian surface, may miss startling discoveries that no human geologist would overlook. Yet that might not continue to be the case: Machine learning is advancing fast, as is sensor technology. By contrast, the added cost of keeping astronauts alive makes manned missions absurdly more expensive than unmanned ones.

I think the future of manned spaceflight lies with privately funded adventurers, prepared to participate in travel that may be far riskier than most governments could impose on publicly supported manned space exploration.

The phrase “space tourism” should be avoided. It lulls people into believing that such ventures are genuinely safe. And if that’s the perception, the inevitable accidents will be as traumatic as the U.S. Space Shuttle disasters in 1986 and 2003. These exploits must be “sold” as dangerous sports, or as intrepid, death-defying exploration, not as vacation cruises that happen to leave Earth’s atmosphere.

Elon Musk’s SpaceX and a rival effort, Blue Origin, led by Jeff Bezos (the owner of The Post), within a few years may start taking paying customers into orbit. These ventures bring a can-do Silicon Valley culture into a domain long dominated by NASA and a few aerospace conglomerates. They have developed the techniques to recover and reuse the main launch rocket, presaging real cost savings.

In coming decades, the entire solar system — planets, moons and asteroids — will be explored by fleets of tiny automated probes, interacting with each other like a flock of birds. Plausible predictions include the construction of robotic fabricators that will then build, in space, solar-energy collectors and other giant structures.

Perhaps most promising, the fabricators will be able to construct, under zero gravity in space, enormous lightweight telescopes. It’s realistic to hope that in 50 years or so, such telescopes, freed from the blurring and absorptive effects of Earth’s atmosphere, will discover a planet like our own, orbiting a distant star, that may harbor life.

By then, thrill seekers may have established a fragile base on Mars. But don’t ever expect mass emigration from Earth. On this I disagree with Musk and with my late Cambridge colleague Stephen Hawking, in their enthusiasm for the rapid buildup of large Martian communities. Thinking that space offers an escape from Earth’s problems is a dangerous delusion. We must solve them here. Battling climate change may seem daunting, but it will be child’s play when compared with making Mars habitable. Ordinary risk-averse people will have no alternative. We must cherish our earthly home.

Yet we and future generations should cheer on the brave space adventurers. Being ill-adapted to their new habitat, and beyond the reach of earthbound government regulators, they will have a pivotal role in what happens in the 22nd century and beyond as they use super-powerful genetic and cyborg technologies to reshape what it means to be human.

But even from that cosmic perspective, the first steps taken on a surface other than the planet Earth were an epochal event — so it is right that we should remember and celebrate the Apollo 11 astronauts.

Read more: