The politics behind Ed Miliband's big speech yesterday are obvious.

Labour knows that immigration policy remains a major public concern, especially in the south-east and other areas that have borne the brunt of the recent human influx. If the party is to win back the marginals it lost in 2010, it must address those concerns. It must also reach out to immigrants themselves, who too often live side by side with white British communities without any meaningful contact.

Even at a time when immigration has slowed markedly and even in places (such as Scotland) that have most to gain from immigration, the subject remains controversial.

It is easy to get the tone of this debate wrong. Labour should know. In government, the party seemed to swing, from attempting to shut down debate by implying that anyone expressing concern about the scale of immigration was a racist bigot, to the opposite extreme: crude "dog whistle" politics that only served to stoke bigotry and intolerance. (Gordon Brown's "British jobs for British workers" could have come straight from a BNP leaflet.)

As the son of Jewish refugees from Nazism, Mr Miliband is well-placed to address this thorniest of issues. Regardless of what today's headline writers make of it, the full text of his speech demonstrates both sensitivity and thoughtfulness.

It recognises that Labour made major mistakes, particularly in hugely underestimating immigration from the EU. The Government then failed to offer adequate support to local authorities in areas where the volume of immigrants placed a severe strain on local services. No wonder established residents complained they barely recognised their own communities and some accused the newcomers of taking social housing and jobs.

There is nothing racist about having a mature debate about immigration. Whether Mr Miliband's pledge of a new generation of council houses and an end to racial segregation in the workplace will take Britain very far along the road to the multi-cultural racial integration he craves is another matter. He even offers a U-turn on the cap on non-EU immigration numbers, which Labour previously opposed. It is questionable whether such a cap benefits Scotland. It is easy to forget that a decade ago there was concern in this country about a dwindling and ageing population. The fact that, annually, births now outnumber deaths is largely down to these new Scots. Scotland needs them.

However, the Labour leader is right to emphasise the importance of the mother tongue and criticise the Coalition for cutting English language courses. As he says: "We can only converse if we speak the same language." Exactly how he would ensure that immigrants teach their children English is unclear.

Debate on immigration has tended to be polarised and shrill. We should recognise that Britain is a more tolerant and open society than 40 years ago. Today we do not think twice about cheering on sports stars such as Mo Farah and Jessica Ennis but there is far to go before Britain becomes an integrated society in which all groupings can celebrate what they have in common as well as their distinctiveness.