'It would have been much more appropriate if a law such as this, which all of the civilised world has given up, was struck down through democratic politics rather than five individuals sitting in judgement,' says Aakar Patel.
In 1950, the British scientist Alan Turing developed something we call the Turing Test. It determines the ability of a computer to show intelligent behaviour.
Turing's test required a human to observe a natural text conversation between a human and a machine (such as on a messaging app). If the human could not reliably tell which was man and which was machine, the computer would be said to have passed the test.
We have, of course, reached that stage in computer intelligence, but Turing was not around to see it.
He died in 1954 at the age of 41. He was convicted of homosexuality in Britain and was made to undergo chemical treatment to make him impotent (this was the punishment offered as an alternative to jail in Britain). He killed himself a couple of years later.
A century before Turing, the great English author Oscar Wilde was also convicted for the crime of being a homosexual. He spent two years in jail, after humiliation in court.
The judge who sentenced Wilde said: 'It is no use for me to address you. People who can do these things must be dead to all sense of shame, and one cannot hope to produce any effect upon them. It is the worst case I have ever tried.
'I shall, under the circumstances, be expected to pass the severest sentence that the law allows. In my judgment it is totally inadequate for a case such as this. The sentence of the court is that each of you be imprisoned and kept to hard labour for two years.'
The crowd in the court cried: 'Shame!'
Wilde said: 'And I? May I say nothing, my Lord?' But the court adjourned and Wilde went off for two years of hard labour.
In 1967, the British parliament legislated a law called The Sexual Offences Act. It decriminalised gay sex between consenting adults. This is, of course, also what our Supreme Court did last week.
Following this, there was a letter in the British newspaper The Guardian, by a reader from Glasgow named Paul Brownsey, which read as follows:
'A toxic colonial legacy dies with India's anti-gay law' says your headline (September 7) above the article about the Indian supreme court's declaration that the law against gay sex is unconstitutional. India has been independent for 71 years.'
'If the law had really been contrary to Indian culture groaning under colonial imposition, one might expect it would have been overthrown long ago.'
Brownsey was referring to many articles in the press worldwide which said that Section 377 was essentially a colonial legacy and therefore we Indians had no responsibility for it. However, as he says, we chose to leave it on our law books for seven decades after Independence.
We must accept this to our great shame.
The other thing that has not been observed in this matter is that the striking down of the section happened by a court and not through legislation as it did in the United Kingdom.
It would have been much more appropriate if a law such as this, which all of the civilised world has given up, was struck down through democratic politics rather than five individuals sitting in judgement.
I know of only two politicians who have spoken out in Parliament or tried to move legislation against the law criminalising gay sex.
One is Tathagata Satapathy of the Biju Janata Dal and the other Shashi Tharoor of the Congress.
I understand that Tharoor was not able to even get support from the majority of the Congress party's MPs when he made the attempt.
Why am I bringing this up?
The preamble to the Indian Constitution reads as follows: 'We, the people of India, having solemnly resolved... to secure to all of its citizens
JUSTICE social, economic and political;
LIBERTY of thought, expression, belief, faith and worship;
EQUALITY of status and of opportunity; and to promote among them all;
FRATERNITY assuring the dignity of the individual and the unity and integrity of the nation.'
This is crystal clear. We were offending the dignity of our fellow Indians with that awful law.
We were offending against their expression, their belief and their equality of status.
How many Turings and Wildes have we lost because they were afraid to express themselves or feared the law or were ostracised by society and forced to lead a life which was essentially a lie?
How many gay women today live in marriages that they do not belong in but were forced to get into because of societal pressure and shame? I cannot even imagine what the numbers are.
While we should be grateful that we have finally done away with a law we should never have had in independent India, we should ponder about why it remained for 71 years and why it took a court to outlaw it.
The issue should have been a matter for popular politics because it offended against the promise we made ourselves in our Preamble.
Ensuring that the rights of the people are upheld by the people themselves is what democracy ultimately is meant to do.
Aakar Patel -- winner of the 2018 Prem Bhatia Award for Political Reporting -- is Executive Director, Amnesty International India. The views expressed here are his own.