At the heart of The Secret Garden, the much-loved children’s novel by Frances Hodgson Burnett, in which a disagreeable orphan is transformed into a flourishing young girl, lies the protective power of secrecy. In finding a garden that has been forgotten, which is overgrown and hidden, Mary finds an echo of her own neglected soul. As she tends it, weeding and planting and seeing the trees come back to life, her self-knowledge also begins to bud. Soon she is blooming, becoming plumper and stronger, the secret she nurtures having begun, in its turn, to nurture her. When Mary shares her secret garden with the sickly boy Colin, he too begins to grow, emotionally and physically. He reveals his ‘secret terrors’ to Mary, and in doing so overcomes them. Secrets in this novel are disclosed only once their protective shelter is no longer required.

It’s an enchanting story that gave me great comfort as a child. I loved the idea of having a secret place that I could share with one special friend. And I had plenty of opportunities to indulge this fantasy, because children’s literature is full of secret gangs, covert missions, secrets codes, hidden forests, passageways and compartments – all of them portals, like the wardrobe in the Narnia series – that introduce the young to the feel and functions of secrecy, its allure, value and dangers.

The word secrecy derives from the Latin secretum, which means to set apart, and from secernere, which means to separate, as with a sieve, which suggests that secrecy is a method of separating and dividing, placing something – or someone – out of the way. In Secrets: On the Ethics of Concealment and Revelation (1983), the Swedish-born philosopher Sissela Bok defines a secret neutrally, as deliberately blocked communication: ‘Anything can be a secret so long as it is kept intentionally hidden.’ Its content, Bok writes, might be less important than its use in differentiating ‘insiders’ – those in the know – from ‘outsiders’, and thus demarcating hierarchies.

That’s one reason why it is so pleasing to be asked: ‘Can you keep a secret?’ It means that the keeper has judged you worthy of being a trusted intimate, sharing in something exclusive. Being in on a secret is delicious, and difficult (it is tempting to tell, to show off), while being on the outside of a secret involves the painful discovery that you have not been chosen as a confidant.

Childhood is full of secrecy and secrets, many of them winkled out of an adult world that is closed to the young. Grown-ups deliberately hide from children things they wouldn’t understand, or knowledge that could be confusing or threatening, which is something children learn to mimic: they learn that keeping things back is often good. Not least, they learn, like Mary, that secrets confer a kind of power.

The Secret Garden was published in 1911. In today’s world, in which transparency rules, secrecy doesn’t command the same respectful treatment – even on the pages of children’s books. States, institutions and individuals who keep secrets are seen as having something to hide, which is by default suspicious; and whistle-blowers such as Julian Assange and Edward Snowden are hailed as popular heroes. Transparency in business and government is the new mantra, backed by a popular culture whose thrust is towards revelation and openness.

In this context of shifting attitudes towards secrets, ordinary, everyday secrecy is now a fraught terrain for children: do secrets help or hurt them? Enable them to grow, or hinder them?

Even in times that celebrated the benefits of secrecy, people have been alert to its potential toxic impact. In Modern Man in Search of a Soul (1933), the psychoanalyst Carl Jung warned that secrets ‘act like a psychic poison that alienates their possessor from the community’. At the same time, Jung recognised that holding secrets is part of the process of individuation:

In small doses this poison may be a priceless remedy, even an essential preliminary to the differentiation of the individual. This is so much the case that, even on a primitive level, man has felt an irresistible need to invent secrets; their possession saves him from dissolving in the unconsciousness of mere community life, and thus from a fatal psychic injury.

In controlled doses, then, secrets remain necessary for a child’s development. Secrecy can overtly serve personal interest, as when children keep information from others to avoid punishment, like concealing that they didn’t eat their broccoli. But secrecy also serves more fundamental purposes: it contributes to the formation of our inner awareness and autonomy; it creates a space for the imagination; and, as well as being a weapon of exclusion, it is an essential tool of friendship.

Children are not born with the ability to keep a secret. They grapple with employing secrecy gradually. In a series of studies in Germany and Australia conducted in the 1980s and ’90s, the psychologists Elisabeth Flitner, Alan Watson and Renate Valtin all found that the concept of secrecy undergoes major changes in children between the ages of five and 12. With the younger children, the researchers venture, it aids the formation of a sense of self.

The games children play from an early age – peekaboo, treasure hunt, hide and seek – are based on secrecy and, crucially, exposure. Kids love hiding games but they also struggle not to give themselves away. My five-year-old niece screams: ‘I am here’ before I’ve reached the count of six in hide and seek. One reason, suggests the Dutch-born phenomenologist Max van Manen in Childhood’s Secrets (1996), is that young children have trouble with the idea that they are not there. Hiding teaches them the more complex idea that, although you cannot be seen, you still exist, after which comes the successful closeting away, from adults, for hours, in secret camps, constructed at home or in the garden, which allows them to create and control their own environment, aiding the development of independence.

Practically every child reading Enid Blyton wants to be a member of the Secret Seven, the gang of boys and girls with a clandestine meeting place accessed by a secret password (spoiler alert, it’s ‘Tiddlywinks’, delivered in a whisper). Peter, the leader of the Secret Seven, has a mother who respects secrets and does not probe them. As in the story ‘The Secret of Old Mill’ (1948):

‘What is it?’

Peter and Janet looked at one another.

‘Well,’ said Peter, at last, ‘it’s a secret really, Mummy.’

‘Then, of course, I won’t ask any questions,’ said Mummy at once. That was always so nice of her – she never made the children tell her anything if they didn’t want to.

Secret places and passwords are byways that allow children to construct their own physical and mental arenas and patrol their borders, loosening themselves, slowly – safely – from the constant supervision of adults.

At five or six, children understand the concept of a secret but find one hard to keep. They’ll blurt out their knowledge of a surprise party or birthday present. While they can just about keep the information to themselves, the strain is obvious: if you wish to, you could easily wheedle it out of them. The next stage is to keep something to oneself with no one knowing. The 19th-century French psychologist Pierre Janet argued that the child’s discovery of secrecy is a significant event because it heralds the birth of an inner world. When a child realises that thoughts and ideas can be kept within and are not accessible to others, they understand that there is a demarcation between their world, which is inner, and that which is outer.

In his memoir Father and Son (1907), the English poet Edmund Gosse describes such an experience as an exhilarating awakening. He had broken a lead pipe, part of the garden fountain, and is waiting in fear for what he assumes is the inevitable discovery (his father was keen to find and punish the culprit), until it dawns on him that he is safe, as someone else is suspected:

There was a secret in this world and it belonged to me and to a somebody who lived in the same body with me. There were two of us, and we could talk with one another… it was in this dual form that the sense of my individuality now suddenly descended upon me.

Edmund realised that he knew something that his father – omniscient, until that moment – did not, which forced upon him an awareness of his own independent and conscious self. In keeping something from a parent and other family members, children experience the separating power of secrecy, which can be deeply unsettling: they are placed at a distance from those important to them, which can be isolating and lonely. But as Edmund found, it also means you can talk to yourself. Secret journals and diaries play a part in this, too. On the blank pages of a notebook, for their eyes only, children can record their honest thoughts and feelings.

Nothing is worse than the false friend who discloses a confidence

The German sociologist Georg Simmel was one of the first modern scholars to examine secrecy, and his salient observations in ‘The Sociology of Secrecy and of the Secret Societies’ (1906) still stand. He believed secrecy was one of the ‘greatest achievements of humanity’. Why? Because secrets create a more complicated life experience. Once people can keep secrets, he observed, they can live in two worlds. Secrets allow us to think thoughts that we are not obliged to act upon, or can nurture us until we do act. They create space for reflection and possibility; allow us to imagine life differently.

Simmel also argued that secrecy was essential in forming and sustaining relationships. It’s an important insight, further developed by Flitner, Watson and Valtin, whose research shows that, for older children, secrecy is tied to norms of friendship. The six- to 10-year-olds they studied expressed uncertainty about divulging a secret, especially about a friend. By 12, a promise not to tell is binding. Children at this age need to be part of a group, to connect with non-adult peers, and secrecy is a way to forge these intense relationships.

Secrets are a currency that is spent creating inclusion and exclusion. But confiding in someone is also an expression of trust – and a requirement of intimacy, which is why sharing a secret is so precarious: you open yourself up and make yourself vulnerable, offering the keeper an opportunity for manipulation and coercion. They might reveal your secret! With secrets, loyalty is affirmed, and outsiders pushed away. Nothing is worse than the false friend who discloses a confidence. The problem is not so much what they reveal – the boy you fancy; that you bunked off maths – but their betrayal.

While many secrets in a child’s life are relatively harmless in content – the knowledge of a garden, a gang’s meeting place, who broke the lead pipe from the fountain – secrecy can hide serious wrongs, and keeping a secret can be a terrible burden. Children often try to keep personal problems – a fight with a mate, bullying, an abusive teacher, an alcoholic parent – from adults and friends, in order to try to manage their own affairs, protect loved ones, or not be labelled a ‘grass’. But the secret can be too big for them to cope with. As well as ensuring the wrong continues, festering unchecked, keeping such secrets causes great distress.

Worse still, secrecy can protect those doing harm. Abusive adults exploit and manipulate a child’s impulse to respect the authority of elders, forcing them to be silent about a serious ill that should be exposed and eliminated. It is hard for children when an adult asks them to keep something to themselves, when one parent requests that their son or daughter withhold information from the other parent, which splits loyalties. The tension between being compelled to keep something quiet and wanting to divulge it can cause great emotional upset. Dark secrets eat away at the holder.

In Secrets (2002), Jacqueline Wilson updates Burnett’s secret garden and Blyton’s Secret Seven for modern readers. Her novel navigates well the advantages of secrecy, as well its dangers. Almost every character has a good secret that protects them, or a bad one that demands revealing. Treasure and India, the young girls at the centre of the story, come from different social backgrounds. Treasure lives in grotty public housing; India, in a fancy house with a neurotic mother and a father who is an embezzler and a drunk. Each girl is friendless and out of favour with her parents, who are flawed, selfish and unhappy.

After meeting accidentally, Treasure and India become firm friends. It is a relationship known to no one else. ‘I’ve got my secret, my special new friend Treasure,’ India writes in her ‘deadly secret’ diary. The secret friendship shelters them – as did the secret garden for Mary – from family troubles, and brings them great happiness.

keeping a secret exerts a physical toll, weighing people down: secrets are burdens that impact negatively on body and mind

Then one day, Treasure’s step-dad Terry whips her with his belt, and she runs away. It the not first time he has abused her, Treasure confides to India (previously ‘he left bruise marks all round my neck’), revealing also that her mother knows about these acts of violence but has told no one. Taking a drastic step to protect her, India hides Treasure in the attic of her house.

But keeping Treasure secret causes everyone anguish. Treasure is cut off from the rest of her family, especially her Nan, who is desperately worried. What starts out as a secret sleepover, soon becomes like a secret prison. While India feels important at first, it doesn’t take long for her to feel powerless and alone. Though hiding Treasure is intended to provide refuge, the children are not capable of coping without grown-ups: they are too young. Resolution comes when India is forced to disclose Treasure’s whereabouts to the adults and explain her flight. Once Terry is exposed, he is cast out, and both girls return to their respective families, close intimates.

As adults, there are times when we need to emulate Peter’s mother in the Secret Seven, and not probe children’s secrets. Other times, we need to be more like Treasure’s Nan. She is the most sympathetic and trustworthy grown-up, and gets the last word, spelling out the moral of the story: some things cannot be ‘hidden indefinitely’; once everything is forced out into the open it can be resolved. The psychological dividends of releasing a heavy secret is something of which the American psychologist Michael Slepian would approve. In a paper published in 2012, Slepian and his fellow researchers suggest that keeping a secret exerts a physical toll, weighing people down: secrets are experienced as burdens, they say, that impact negatively on the body and the mind.

But since we know that learning to navigate the power of secrecy is essential to becoming an autonomous individual – a person among others, involved in meaningful and lasting relationships – perhaps children need to be able to administer small amounts of secrecy in their lives. They need room to experiment with secret-keeping, without being weighed down by secrets too large or too grave to bear. Every child needs a little secrecy.