What does it mean to be a free country?

No-one is naive enough to believe that it means acquiring the capacity to do whatever you want. For governments, of big countries or small ones, room to manoeuvre is scarce. An independent Scotland would face the same limits on its freedom of action as it does now. The power of oligarchies and markets and inequalities to restrict democratic choice would not disappear.

Freedom does not arrive just because you declare it. And if it ever does arrive, it is complicated, constrained and contested. Scots, coming late to the business of national independence, also come to it with few illusions. Too much has happened to too many dreams of national liberation for any sensible citizen to believe in a great moment of transformation after which everything will be simpler, purer, better.

But national freedom isn't meaningless either. Room to manoeuvre can be expanded. Democratic spaces can be opened up. The terms of the struggle between public and private interests can be renegotiated. Citizens can become more confident of their power to insist on decency and dignity. A place can be defined as a society and a culture as well as an economy. And the greater the constraints, and the more naked the power of unaccountable elites, the more vital it is that whatever collective freedom remains is grasped.

Like everything else, though, even this qualified freedom has a price. Some of that price is literal - the financial losses that have to be set against financial gains. But there's another kind of reckoning to be done, one that is more abstract but perhaps in the long term more important. National freedom isn't another word for nothing left to lose. It's another word for no-one left to blame - no-one, that is, except yourself. If you make your own choices, you become responsible for their consequences.

This is, especially for small nations which have long been part of a larger imperial whole, a severe loss. There is a deep and abiding satisfaction in imagining how wonderful you would be if only those foreign bastards would let you. Being free means having to live with the dawning realisation that you might not be so wonderful after all.

Freedom in this sense is not an illusion - it's an act of deliberate disillusion. What has to be broken free of is not just the big bad Them. It is also the warm, fuzzy Us of the nationalist imagination - the Us that is nicer, holier,

more caring. What a free country quickly discovers is that the better Us of its imagination is not already there, fully formed, just waiting to blossom in the sun of liberation. It has to be created and in order to create it you have to genuinely decide that you want it.

WB Yeats described this kind of freedom well in the early years of the Irish Free State in the mid-1920s. He and his artistic collaborators were under attack for daring to put on stage ugly images of an Irish reality. Yeats drew attention to a crucial distinction between national pride and national vanity: "The moment a nation reaches intellectual maturity, it becomes exceedingly proud and ceases to be vain and when it becomes exceedingly proud it does not disguise its faults."

What Yeats meant is that before a nation becomes free, it has to wallow in national vanity, creating an idealised picture of a special place and of a people with a unique destiny. When it acquires freedom, it has to replace this vanity with a national pride that consists in having the self-confidence to tell the truth about yourself. Nationalism is a form of myth-making; independence demands a lot of myth-breaking. It has to replace the distorting mirror of fantasy with the sharp reflection of a real self.

This kind of national pride is hard work. You have to decide what are the things your nation should be proud of and how it is going to achieve them in reality. In Scotland's case, this might mean moving away from claiming a special culture of egalitarianism and towards an honest appraisal of the massive structural inequalities that call that comforting self-image into question. It might mean, as Gerry Hassan argued so cogently in his book Caledonian Dreaming, abandoning the notion of Scotland as a wonderfully democratic society and getting to grips with the realities of social division and exclusion.

Without this hard work, though, political independence lacks its necessary foundation of psychological independence. The country remains in thrall to a mythic version of itself. It is much easier to send an external government packing than it is to cut yourself off from the cosy and comforting self-image that dependent cultures create for themselves. But when you're on your own, those self-images cease to be warm and fuzzy, and turn toxic.

This is largely what happened to Ireland. It gradually disengaged from London rule. But it has struggled to disengage from the exaggerated notions of Irish specialness that were built up through that conflict.

National vanity continued to hold sway: Ireland didn't have to deal with its deeply problematic realities because it was uniquely blessed. It was holier, happier, more cultured, more Gaelic, more spiritual, than anywhere else.

In more recent times, this archaic sense of a unique destiny was replaced with another set of equally delusional exaggerations: Ireland as the richest, most successful, most globalised economy in the world, where banks would grow forever and property bubbles would inflate to infinity. These delusions can be seen as compensation for centuries of repression, but they have made it hard for Ireland to deal with its own, humdrum, non-exceptional realities in everything from poverty and mass emigration to the victimisation of children and women.

Scotland's situation at the point of potential independence is ­infinitely better than Ireland's was in the 1920s. It does not risk the violence that stained Ireland's sense of its better self. However divisive the referendum campaign has been, it will not lead to the kind of traumatic civil war whose legacy deformed Irish politics for decades.

Whatever happens, Scotland will not suffer the consequences of partition which, in Ireland's case, meant that the ideals of a pluralist democracy were lost in the creation of two mutually exclusive sectarian states.

And Scotland has, as Ireland did not have at independence, the context of a European Union which, for all its faults, gives small nations a set of international institutions within which they can make themselves heard.

These ­advantages give Scottish independence, by historical standards, a remarkably fair wind. If it happens, it will also create its own energy of euphoria. But fair winds and moments of ecstasy don't last very long in a harsh environment of long-term global instabilities. Patriotism is a rocket fuel that can get you out of the orbit of an old order but it burns up quickly and leaves you dependent on much more complex and subtle systems of guidance to get you through the lonely expanses of historic space.

Those guidance systems will have to be calibrated to Scotland as it is and the world as it is, not to any nostalgic belief that the conditions of an idealised older Britain can simply be recreated in 21st-century circumstances.

For an outsider like me, this is what is actually most interesting about the possibility of Scottish independence. It is not that Scotland might become a new state, but that it might become a new kind of state.

For independence to be meaningful, Scotland would have to start with an acknowledgement that many of the things to which it appeals - the power of government, the legitimacy of democratic institutions, the equality of ­citizens - are in crisis. They cannot be assumed, they have to be radically reinvented.

A new Scotland is as good a place as any to start that work. To begin it, Scotland needs to own not just its country, but also its own reality.

Fintan O'Toole is literary editor of The Irish Times and the author of many books on culture, history and politics