Polari (also spelt Palarie, Parlary, Palare and various other ways) is a form of language that is most commonly associated with gay men (and to a lesser extent lesbians), used in the first two-thirds of the 20th century in British cities that had large and mainly underground gay subcultures.

The language was particularly well known in London and was associated with chorus boys who danced and sang in West End productions, and male prostitutes who drank endless cups of tea in seedy cafes hanging out around Piccadilly ("the dilly") looking for "steamers" (clients).

Chaps who joined the merchant navy after the second world war looking for a glamorous life of travel to exotic lands while working as dining staff or stewards also used Polari, adopting new words from languages encountered around the globe.

These were not the butch sailors of Jean Genet – instead they were the outrageous precursors to today's camp flight attendants. The most elegant of these sea-queens would host fabulous soirees in their cabins, complete with printed invitations, vodka martinis, Alma Cogan records and costumes that would have made Shirley Bassey weep with jealousy.

Polari is something of a mongrel language – if it can even be called a language at all. It arose from a number of overlapping "low" forms of slang that were associated with travelling or stigmatised groups, stretching way back to the Thieves Cant of Elizabethan England.

The 18th century added words from the molly house culture – mollies being men who had sex with other men, sometimes while dressed as women. Their subculture involved using female names and parodies of birth-giving and heterosexual marriage. A great deal of what we know about them comes from court records, "sodomy" being a capital offence at the time.

The 19th century also saw the incorporation of some Parlyaree, the Italian-derived language used by travelling entertainers, fairground people, costermongers and beggars. Later influences on Polari included Cockney rhyming slang, backslang (pronouncing a word as if it is spelt backwards), Yiddish, Lingua Franca (words from sailors slang), American air force slang and the vernacular of drug users. Polari speakers developed their language as a result of mingling with these transient communities.

Polari was a secret language never committed to print or tape recordings. Instead, it was passed on via word of mouth and, as a result, many versions were created at the same time. Most speakers would have known a small core vocabulary of words for clothes, types of people, adjectives to show approval (or not), sexual acts and everyday objects – but there was also a "fringe" vocabulary containing many words known only to a few. Standards of spelling, pronunciation or even meaning were not always adhered to.

Polari was much more than a camp fad, however. It was a necessity. In a world where homosexuality was stigmatised through the institutions of law, medicine and religion, these men needed a way to express themselves without getting caught. Dropping the odd Polari word into a conversation with a new, handsome acquaintance was one way of working out if they might be interested.

Other, more adept speakers would conduct entire conversations on public transport in Polari, dishing the dirt on last night's trick or giving detailed deconstructions of the hair and fashion choices of the hapless lady sitting across the aisle.

Polari also acted as a form of initiation into the gay subculture, with the older gay men teaching the newbies all of the words and "christening" them with their own camp name – Nathan becomes Nanette. Some Polari words labelled the technicalities of cruising, gay sex and various sexual identities – words mainstream society had not bothered to provide words for (or if they had, they were nasty ones); others gave new words for existing concepts.

In this way, Polari could be seen as a form of anti-language, a term created by Michael Halliday in 1978 to describe how stigmatised subcultures develop languages that help them to reconstruct reality according to their own values. Halliday used "anti-language" to describe the language use of Polish prisoners, but the concept applies equally well to Polari. A Polari word like "bona" meant good. However, it wasn't a straightforward translation of the English word "good" – it meant good according to the values of a Polari speaker.

As such, anti-languages demonstrate opposition to mainstream society. Polari was often used in a rather sardonic, cutting way, to demean or objectify, and this was never more so than the range of feminising words that were used to refer to the police – the natural enemies of the Polari speaker. "Betty bracelets", "lily law", "hilda handcuffs", "orderly daughters" – these terms all mocked and questioned the gender identity of this particularly persecuting organisation.

It was this rather snarky aspect of Polari that contributed to its decline. By the 1970s, gay liberation politics had become impatient with camp stereotypes and the casual sexism of some older gay men. Overexposure due to the popular 1960s radio series Round the Horne, which featured two camp Polari-speaking characters, had also spoilt the secret, and the decriminalisation of homosexuality meant that there was less of a need for an anti-language. Since then, gay men and lesbians in the UK have gradually stopped being part of an anti-society, and have moved towards the mainstream.

I love Polari, but hopefully, the narrow-minded social conditions that led to its creation will never require anything like it to happen in this country again.

• This thread was commissioned via a You tell us thread. If you have a subject that you would like Cif to cover, please visit the latest thread