FORMER US president Barack Obama provided much food for thought in a wide-ranging and refreshingly reflective address to a dinner in Edinburgh last Friday night organised by The Hunter Foundation.

He highlighted the rapid pace of change in the world today, and the major challenges resulting from this, while flagging important lessons from past decades and centuries as we contemplate the future.

It is certainly important not to lose sight of what has gone before as we navigate future challenges. Yet all too often, our politicians and some of those they lead seem to lose sight of the big picture, and ignore crucial lessons from the past, as they take an often detrimental short-term approach.

Read More: Obama vows to return to Scotland to see the bad weather

The 44th president of the United States highlighted the need to deal with mass migration compassionately, and through “orderly processes”. And he declared, in the context of the crucial issue of climate change, that it had been shown that environmental sustainability and economic progress are “not contradictory, they are complementary”.

Mr Obama also flagged the importance of providing opportunities for young people.

Those in government around the world should heed this message, particularly given the myriad challenges faced by young people. In a European context, youth unemployment is painfully high in many countries, including crisis-hit Greece. It is crucial for society and economies, as well as for young people themselves, that these individuals have the best possible opportunities to contribute their talents.

In the UK, young people face far greater financial challenges than the previous generation, including a lack of hope for many who might in decades past have been able to purchase their own home, but are now priced out of the market. And then there are new burdens such as eye-watering university tuition fees in England.

In these days of populism, Mr Obama’s thoughtful address last Friday was a welcome, though certainly not unexpected, breath of fresh air.

His considered and astute global historical perspective as he discussed current events contrasted starkly with the noisy, frenetic, tub-thumping approach of some of those leading us seemingly towards a hard Brexit.

Mr Obama emphasised the importance of tackling inequality on various fronts. And he highlighted the dangers to society if there was an increasing gulf between the most wealthy and the population at large.

In this context, he highlighted the need to address the impact of rapid technological advances and the rise of artificial intelligence against a backdrop of globalisation.

He hammered home his view that “our market economies” had been great creators of wealth and innovation.

However, looking ahead, he flagged the potential problems arising if the rapid technological advances meant people did not have the skills to “make a decent wage”, declaring that it was known that economies that did not work as well in terms of providing opportunity in time broke down.

Emphasising the dangers of rising inequality, he warned: “It is what leads people to turn to simplistic, populist alternatives, both on the right and the left.”

Of course, Mr Obama was able to cite some encouraging results from recent elections in Europe. He declared he was glad to have seen Europeans standing up for a vision of inclusiveness in recent elections in Austria, the Netherlands and France.

Mr Obama, while not passing comment on Brexit and noting this vote followed vigorous debate, highlighted the importance of a strong relationship between Europe and the US. He noted Scotland, the UK as a whole, and the US all benefited from such a relationship.

In terms of the huge challenges posed by technological change, he hammered home the need to “make sure that a high-tech economy works for everybody and not just a few”. Mr Obama also flagged a need to do more to close the gap between rich and poor globally.

He meanwhile pointed out you could not stuff technology back in its box.

We do not need to look far these days to see the challenges and problems, as well as the opportunities and benefits, arising from technological advances.

New technology has been a key enabling factor in huge numbers of job cuts in the banking sector in recent years, in back offices and in branches that have closed. While banks might like the attendant cost savings, this has heaped misery on tens of thousands of employees who have lost their jobs.

And you only need to observe the ever-greater numbers of self check-out terminals in major supermarket chains and other shops to see the direction of travel in a retail sector that is struggling and consequently, like the banks, has in many instances turned to cost-cutting to try to ease the pressure on profits.

Of course, there is much more to come in terms of the impact of new technology, and the pace of change does look to be accelerating significantly.

Accountancy firm PwC recently estimated “up to around 30 per cent” of existing UK jobs were susceptible to automation from robotics and artificial intelligence by the early 2030s.

It notes new automation technologies will, through productivity gains, generate additional wealth and spending that will support more jobs, primarily in services sectors that are less easy to automate. While job creation is always welcome, this analysis appears to beg the question of whether the posts that will be created will be lower-paid, and less secure, than those that are lost.

PwC believes the likelihood of automation appears highest in sectors such as transport, manufacturing, and wholesale and retail, and lower in education, health and social work. Men, it notes, could be at greater potential risk of job automation than women.

Crucially, PwC cites education as the key differentiating factor for individual workers. And this brings us back to Mr Obama’s point about a high-tech economy having to work for everybody.

It is crucial lower-skilled workers do not find themselves left increasingly behind by the march of technology, and unable to earn a decent wage.

This will not be an easy problem to solve. However, awareness of the scale of this challenge is a good starting point.