In Peter Pan in Kensington Gardens, JM Barrie describes a moment when a young girl, seeking to comfort a tearful Peter, gives him her handkerchief. But he doesn’t know what to do with it. Barrie writes: “… so she showed him, that is to say she wiped her eyes, and then gave it back to him, saying ‘Now you do it,’ but instead of wiping his own eyes he wiped hers, and she thought it would be best to pretend that this is what she had meant”.

With this touching little scene, Barrie neatly demonstrates that he had observed, and understood, something that psychologists call intentionality – a feature of the "theory of mind". The ability to understand that one’s own knowledge, beliefs and feelings might not be the same as someone else’s is one of the keys to understanding the complexity of human relationships – and is something that most children learn at the age of three or four.

In illustrating this fundamental stage of child development through the interaction of two children, one with a solid grasp of other minds and the other without, Barrie was remarkably prescient. The Peter Pan books were written at the turn of the 20th century and the term theory of mind was not used until the late 1970s. In 1985, psychologists showed that failure to employ theory of mind is an important symptom of autism, its related condition Asperger’s Syndrome and various other psychiatric conditions.

In Peter Pan and the Mind of JM Barrie: An Exploration of Cognition and Consciousness, neuroscientist Dr Rosalind Ridley unpacks the magic and oddity of the tales that have captivated audiences for generations. In doing so through the lens of her own expertise, she reveals that Barrie had an almost uncanny grasp of human cognitive development four to eight decades before psychologists began to work on similar questions about the way we develop thinking and reasoning skills.

The profundity of children's books

Ridley has a distinguished career in neuroscience research with the University of Cambridge and Medical Research Council. Her work has focused on the brain mechanisms underlying cognitive processes such as learning, memory and problem solving. Since childhood, Ridley has been an avid reader of literature and poetry – and a collector of books.

Rereading Barrie’s books for children, she began to realise the extent to which Barrie had grasped many of the topics that she has spent her working life researching in order to come up with new treatments for dementia and to gain a better understanding of neurological conditions such as stroke which cause cognitive impairments.

Peter Pan and the Mind of JM Barrie is the first book of its kind to explore fully how Barrie delved into the complexity of the developing human mind in his writing. Published at a time when cognitive psychology was in its infancy, the Peter Pan books were immediate hits and continue to inspire pantomimes complete with pirates, princesses and perambulators.

Ridley argues that Barrie’s enduring appeal (along with that of other authors for children, including Lewis Carroll) lies in his study of the unconscious mind – and its many quirks and foibles. Barrie referred to his nonsensical ideas (a boy who flies, a dog who becomes a children’s nanny, a crocodile who has swallowed a clock) as whimsicalities. These whimsicalities, proposes Ridley, are the means by which Barrie explores the nature of cognition – and that his purpose was to expiate the pain of his own childhood.

“It is Barrie’s deliberate use of cognitive mistakes and confusions in order to both amuse and illuminate the way we think that suggests that he was being intentionally analytical rather than descriptive," she writes. "The weirdness of some of Barrie’s illogical stories suggests that he is tapping into something important in cognition.”

In a wealth of detail, and through close textual analysis, Ridley shows how Barrie created a narrative that works on several levels: as a coming-of-age story, as the myth of a golden age, as a fantasy to delight child and adult readers. Most importantly, asserts Ridley, Barrie invented Peter Pan to “make some sense of his own emotional difficulties, to investigate the interplay between the world of facts and the world of imagination, and to re-discover the heightened experiences of infancy”.

A boy who could never grow up

In Peter Pan in Kensington Gardens Barrie describes for readers how the story comes from an inner dialogue with the fictional boy David, during walks together in the park. “First I tell it to him, and then he tells it to me, the understanding being that it is quite a different story; and then I retell it with his additions, and so we go on until no one could say whether it is more his story or mine.”

Peter Pan is the boy who doesn’t quite fit in, a "betwixt-and-between" who can fly and, most famously, never ages and never becomes adult. There is, suggests Ridley, a bit of Peter in all of us: “the child who lives in the heart of the adult; memories that we carry with us throughout our life but do not themselves age; dreams that disobey logic; the private world inside our head and those moments of exceptional experience that we rarely talk about”.

Barrie was fascinated by children – they were his preferred companions throughout his adulthood – and he, just like Peter Pan, was in many ways a boy “who could never grow up”. Ridley suggests that the Peter Pan books can be read as an escape from adulthood into a fantastical childhood, where anything can happen, but also as a plea for greater understanding of the mental and emotional needs of children.

A broad university education equipped Barrie to think across disciplines, and in fashionable London, he was exposed to the ideas of leading thinkers, including Thomas Huxley, HG Wells and Henry James. The belief that god made the world in seven days had been newly overturned by Charles Darwin’s theory of evolution, which showed that humans were animals.

Barrie saw children not as miniature adults waiting for their minds to be filled with facts, or small savages needing to be disciplined (as Baden-Powell who founded the Boy Scouts had done), but as developing beings who required nurture and encouragement in order to become sensitive adults. Ridley notes, interestingly, that Barrie believed education was often damaging.

Ostensibly, Barrie wrote the Peter Pan books to entertain five boys whom he met in Kensington Gardens in central London. The nature of his relationship with them (their parents died and he became their guardian) is likely to remain a vexed question. Despite the almost purple prose in which Barrie described the overnight visit of an imaginary child, Ridley is impressed by the view of the youngest of the boys themselves, who said that Barrie was “an innocent, which is why he could write Peter Pan”.

Life and art

Ridley, like most other scholars, sees Barrie’s tragic childhood as pivotal to his creativity. His older brother died in a skating accident and remained more alive in their mother’s thoughts than her surviving son. Ridley writes: “He learnt from his mother’s pre-occupation with his dead brother that things that do not exist physically can be more important in people’s minds than things that do exist.” Barrie’s mother was present but lost to him – and a search for a mother is a strong theme in his books.

Barrie married but was childless (it’s thought that he may never have had sex with his wife). He was painfully aware of his diminutive stature, writing in a letter: “Six foot three inches … if I had really grown to this it would have made a great difference in my life”. He struggled with sleep problems and described many of the states of consciousness and unconsciousness later identified by psychologists as parasomnias.

An important role of sleep is to consolidate and rationalise memory. Barrie expresses this charmingly in Peter Pan and Wendy:

 “It is the nightly custom of every good mother after her children are asleep to rummage in their minds and put things straight for next morning, repacking in their proper places the many articles that have wandered during the day… It is quite like tidying drawers … When you wake in the morning, the naughtiness and evil passions with which you went to bed have been folded up small and placed at the bottom of your mind; and on top, beautifully aired, are spread out your prettier thoughts, ready for you to put on.”

The quest for happiness

Ridley describes Barrie as “a naturalist of the mind”. Woven into his stories are dozens of details about human behaviour – from contagious yawning (Wendy’s “light blinked and gave such a yawn that the other two yawned also”) to mental constructs such as time travel (an aspect of memory and recollection) and the power of opposites (“It was her silence that they heard”). They reveal Barrie to be an acute observer of animals and people in a period when the theory of evolution was still hotly contested.

Barrie may have been extraordinarily forward-thinking but he was also a man of his time. Although he champions girls in some respects (“Wendy, one girl is of more use than twenty boys”), his attitude was frequently misogynistic: in creating his female characters he conflates femininity with domesticity. The original Wendy house, that potent symbol of gendered play, is built around Wendy by the fairies who seek to protect her from the cold of the night.

Ridley concludes that Barrie was more than anything interested in “the nature of consciousness and those rare moments of sublime consciousness and sublime imagination that we all experience” – the happiness that so often eluded him. She ends her voyage into JM Barrie’s mind with a quote from his protégé, AA Milne, creator of Winnie the Pooh. In his autobiography, It’s Too Late Now, Milne wrote: “Childhood is not the happiest time of one’s life; but only to a child is pure happiness possible.”

This article first appeared on the University of Cambridge website.