Mass immigration into Europe in the past 50 years has profoundly changed the continent and is likely to change it even more over the next half century. Yet it is a subject so immersed in fear and wishful thinking that it often seems we still don't have a proper language in which to discuss it.

It is partly for this reason that Christopher Caldwell's new book, with the melodramatic title Reflections on the Revolution in Europe, will seem rather shocking to some readers of this newspaper. For he asks some unusually direct questions: can you have the same Europe with different people? Why did mass immigration happen when so few people actually wanted it? Immigrants want a better life but how many of them want a European life? Why is minority ethnic pride a virtue and European nationalism a sickness? Is political correctness just fear masquerading as tolerance?

As you can tell from those questions, the book is a sustained attack on the well-meaning liberalism that is still the dominant note in official immigration debates. Yet although Caldwell, a conservative American, believes that European immigration has not been a success, at least for the host societies, he is not anti-immigrant and says that he is a great supporter of the American melting pot. The book, or most of it, is written with the bemused but decent "native" European in mind.

Even if you disagree with his premises, Caldwell is worth persevering with because he is a bracing, clear-eyed analyst of European pieties. And that is partly because, as an American, he knows that mass immigration is not only compatible with a strong, confident, patriotic society, but may even require it. He can see Europe from the outside and has a genuinely pan-European view of the immigration issue, something rarely encountered in domestic commentary.

Caldwell cuts to shreds the conventional wisdom of the "immigrationist" ideology - the view that mass immigration is inevitable and in any case a necessary injection of youth into our ageing continent. He shows, contrary to the immigrationists, that the flows of recent decades are unprecedented. He also demolishes the economic and welfare- state arguments for mass immigration and points out that in most countries there was no desperate need for extra workers in the 1950s - in Britain's case, Ireland still provided a reserve army of labour. One of the most startling figures in the book is that the number of foreign residents in Germany rose from 3 million to 7.5 million between 1971 and 2000 but the number of employed foreigners stayed the same at 2 million.

Caldwell is at his best describing the confused cultural and intellectual condition of much of Europe at the time the first waves of immigrants were arriving. It was hard, he points out, to follow Europe's rules and embrace its values when Europeans themselves were rewriting those rules and reassessing those values. After the brutal experiences of the first part of the 20th century - two world wars, the Holocaust and de-colonisation - European elites had embraced a liberal universalism that declared the moral equality of all people and implicitly questioned the legitimacy of most racial and gender hierarchies.Liberal universalism could, in theory, have been compatible with confident nation states and national identities, but in practice it seldom was. The idea of national traditions and solidarities came to be scorned by liberals in many European countries.

Caldwell reverses the conventional argument, which says that if immigration has been a relative failure it is because the host society has been too hostile and unaccommodating. On the contrary, he argues, it is because most of the host societies were too weak and insecure to make newcomers an offer that was sufficiently confident to secure their loyalty and integration. Most European countries, constrained by liberal universalism and the immigrationism ideology, were simply too laissez-faire towards migrants. For the first time in modern history, European societies were set up to allow a big group of citizens to lead their lives as if in a foreign culture.

Caldwell somewhat overstates the case - surely the failures of European immigration can be attributed to both the hostility of the masses and the insecurity of the elites. But then he is not seeking to be balanced and reasonable. This is a declamatory, polemical work and no more so than in its treatment of Islam. In fact, the book is really two essays - one an insightful probing of Europe's confusion about postwar immigration; the other a rather cartoonish polemic about the potential Islamic takeover of Europe.

There obviously have been, and are, particular problems associated with the arrival into an increasingly secular and liberal Europe of large numbers of Muslims with a strong, often illiberal religious world-view. But Caldwell here abandons his clear-eyed reporting in favour of recycling a mild version of the neoconservative "Eurabia" thesis, which sees a decadent, irreligious Europe overrun by militant Islam.

He provocatively points out that there were fewer Bolsheviks in Russia in 1917 than there are Islamists in today's Europe. He also invites us to imagine that at the height of the cold war, Europe had received a mass inflow of immigrants from communist countries who were ambivalent about which side they supported. Again, it is fine to square up to the issue of Muslim commitment to national citizenship (one-third of British Muslims say they place their commitment to fellow Muslims before Britain) but to equate the war on terror with the cold war is outlandish.

In other areas, too, Caldwell has a tendency to heckle from the sidelines, rather than grapple with dilemmas. Yes, Europe did overestimate the need for migrants and underestimated the cultural and religious upheaval they would bring, especially those from outside Europe. But does Caldwell want to reverse the postwar liberal universalism and its associated playing down of national identity, which was partly inspired by the US itself? How do we in today's Europe nurture a sense of national belonging - and a sense of a collective "we" strong enough to sustain generous welfare states - that is compatible not only with mass immigration but also with the postmodern individualism that has been an even more striking feature of recent decades? Liberal nationalisms should not be built against the feelings of the majority, as elite-driven multiculturalism sometimes seems to be, but that in itself does not get us very far.

Moreover, Caldwell is far too sanguine about the US experience with race and immigration and does not seem aware that the idea of the "melting pot" has been under sustained attack in the US for decades. He is also too pessimistic about the UK and ignores, for example, the great success of Indians and Africans in climbing the professional ladder. And he is too ready to take official Jewish accounts of the return of anti-semitism at face value.

And yet, compared with most literature on migration, so often dull and cliché-ridden, this book pulsates with ideas: how the immigrationists cannot, logically, have both integration and their beloved diversity; how it was easier for migrants to integrate into factory economies than the more intimate service economies of today; how migrant disappointment can increase the less racist a country becomes as failure becomes more humiliating. Caldwell even proposes the startling theory that in modern "libertine" Europe, in which the search for sexual pleasure is increasingly paramount, the gap between haves and have-nots is reinforced (although this thesis could surely be reversed: beautiful, sexy poor people can now compete on more equal terms with ugly rich people - just don't be both poor and ugly in the modern west).

Caldwell quotes the French political philosopher Raymond Aron saying that "with humanity on the way to unification, inequality between peoples takes on the significance that inequality between classes once had". This applies within as well as between nation states and is another reason why the fallout from decades of mass immigration is, as Caldwell says, the most important problem facing Europe. And it is one which European democracy is handling with a striking lack of confidence.

• David Goodhart is the editor of Prospect magazine