## Practical applications of Y Combinators in Clojure

When the term Y Combinator is mentioned in most technology circles today, the image it usually conjures up is of the well known startup incubator with their orange logo and a list of famous funded companies. There’s a very interesting reason they chose this name, and their FAQ page 1 gives some context on why they did so,

The Y combinator is one of the coolest ideas in computer science. It’s also a metaphor for what we do. It’s a program that runs programs; we’re a company that helps start companies.

Which of course begs the question –  why are Y Combinators so cool and are there any real reasons to know about them?

This post aims to provide insight into some practical applications of Y Combinators, and I highly recommend reading some of the following resources on the topic that do a great job in articulating the theory behind them. 2 3 4

## A gentle introduction

Let’s assume we want to write a recursive function that does something useful, but with a catch – we don’t want to invoke this recursive function directly from within itself. Why would we want to do this? Multiple reasons might force us to – perhaps we’d like to avoid stack overflows, or perhaps there are other deeper reasons which are out of the scope of this post. 5 6. Irrespective – how then would we go about doing so?

In other words, the problem we’re trying to solve is to “introduce a self reference to the function, without a direct self reference”.

Before diving into the programming aspects, let’s consider this in a purely mathematical form. A recursive function can be defined partly by itself. So, in the case of the Fibonacci series,

$\text{Fib}(0)=0\text{ as base case 1,}$
$\text{Fib}(1)=1\text{ as base case 2,}$
$\text{For all integers }n>1,~\text{ Fib}(n):=\text{Fib}(n-1) + \text{Fib}(n-2).$

Now, how would we give such a recursive function an input, such that its output is the same as its input? For example, in the following function,

$\text{F}(x) = x * x$

there are two inputs: 0 and 1, for which the function’s output is the same as the input provided to it. This is defined as the fixed-point of this function.

If we can now find a fixed-point p of F such that F(p) is equivalent to p, we can use F(p) or p interchangeably (since they are the same thing) as the “recursive” function without direct self-reference 7.

It turns out that for any generic λ-expression f , $(\lambda x. f(x x))(\lambda x. f(x x))$ is a fixed-point of f 8.

Given this, we can build a function that returns a fixed-point for any function f by taking the function in as an argument:

$\lambda f. (\lambda x. f(x x))(\lambda x. f(x x))$

This is known as the fixed point or Y combinator. Therefore, for any function f, Y(f) is a fixed-point of f. That is, f(Y(f)) is equivalent to Y(f).

## A real world example

So far so good. But how is this useful and why should you know about it? Let’s examine the case of a Clojure function that gives us the sum of a sequence of numbers 9.

As we can see, this function invokes itself  at the very last line, which is the kind of behavior we’re trying to avoid. How would we write this without a direct self reference? One way to think about this is to express it as a sequence of function calls that starts by being given a function, and returns to us not the result itself, but a sequence of “next” functions to compute the sum of that sequence. Here’s an example,

This looks like it works. But as we can see, in order to get the sum for a two element vector, we needed to invoke this function thrice – clearly not a great use of our editing skills or time. How would we make this simpler? By simply finding the fixed point for this function, we could achieve what we set out to do! 10. Let’s start by writing a fixed point combinator.

If we were to pass the sum-seq-gen function to this Y combinator we just wrote above, life becomes much simpler.

So far so good. But the real power of a combinator isn’t just that it allows us to just write non-direct-reference recursive functions. It is that it allows us to create very useful wrappers around our functions, which can allow us to achieve all sorts of cool things without ever needing to rewrite our original function. As an example, let’s consider the use case of needing to log every internal function call that’s going on in the sum-seq-fn function. In the regular programming model, we would need to add these log lines to the sum-seq-fn itself, which is a huge overhead. But by using combinators, we can just define a LoggingY that will do this for us.

Without having to change the original function, we’ve just added some deep instrumentation into our function.

## A memoization example

Let’s consider a slightly more non trivial example. What if we wanted to make a recursive function more efficient by introducing memoization? Could we write a generic non-recursive function and then apply an equally generic combinator to memoize it? Absolutely!

For this exercise, let’s define a more generic fixed point U combinator 11, which applies an “abstract” function myapply on to the function f. We can use the freedom of choosing myapply, for example, to transparently interpose memoization.

We can now create a combinator ready 12 function that returns an anonymous function that will cache a function’s arguments and results for it.

As we can see, by never having to modify the original function, we’ve been able to use a variety of specific or generic combinators to provide wrappers that can help in making programs more optimal, easier to debug and ultimately, fine-tune.

1. http://www.ycombinator.com/faq/
2. https://medium.com/@ayanonagon/the-y-combinator-no-not-that-one-7268d8d9c46
3. http://matt.might.net/articles/implementation-of-recursive-fixed-point-y-combinator-in-javascript-for-memoization
4. https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1
5. http://en.wikipedia.org/wiki/Stack_overflow
6. http://aegis.sourceforge.net/auug97.pdf
7. Seriously, highly recommend reading up on what fixed point combinators really mean
8. http://en.wikipedia.org/wiki/Lambda_calculus
9. Courtesy http://www.fatvat.co.uk/2009/04/understanding-y-combinator.html
10. This almost seemed like magic the first time I encountered it!
11. http://lambda-the-ultimate.org/classic/message5463.html
12. http://stackoverflow.com/questions/15859673/fixed-point-combinators

## Texting should improve language skills, not regress them

If the past few generations (millenials and onwards) have grown up spending the majority of their lives communicating over the written medium – text, email, et al – aren’t they more likely to have a better command over language? Rather than be lambasted for using SMS and have people cry about how language is devolving over time, isn’t it fair to assume that they’re much better off than those who descended on the written word only a few times a year as part of a school report or forced letters to family and friends?

(h/t: xkcd)

## Piqued by Piketty

The rise of the middle class has been a hugely important political and social development across the world, spanning a large part of the 20th century. How would society change if the number of jobs that have historically driven this section of the population were to come crashing down, as a result of technological progress and automation? Would widespread unemployment potentially result in the kind of social, political and economic unrest normally associated with wars? More importantly, would the economic inequality brought about by such changes cause civilization to go off track?

Thomas Piketty, an economist at the Paris School of Economics, recently published a book in which he argues that the US might be pioneering a hyper unequal economic model in which the wealthy top 1% hold the lion’s share of the national income, leading to an ever increasing marginalization of the middle class. The book has had some glowing reviews, with one reviewer terming it “An economic, social and political history of the evolution of income and wealth”. Piketty’s inspiration is wide ranging, taking cues from the books of Honore De Balzac and Jane Austen, and offers a treasure trove of data that he along with his Berkeley collaborator Emmanuel Saez have collected over the last decade. As the world bank researcher Branko Milanovic says in his review,

“I am hesitant to call Thomas Piketty’s new book Capital in the 21st century (Le capital au XXI siècle in the French original) one of the best books in economics written in the past several decades. Not that I do not believe it is, but I am careful because of the inflation of positive book reviews and because contemporaries are often poor judges of what may ultimately prove to be influential. With these two caveats, let me state that we are in the presence of one of the watershed books in economic thinking.”

Piketty’s main thesis is that over time, the return on investment will be higher than the rate of growth of the overall economy, implying that extremely wealthy individuals will own a bigger slice of the global economic pie. In fact, he believes that this will happen automatically without any natural factors to staunch its progress. Technology and automation will serve merely to enhance this process, given a large section of society will lose their jobs and the resulting mass unemployment is likely to create a society rife with social unrest and upheavals, further weakening the middle class.

If these arguments have wings, then it becomes entirely clear that there are world altering factors at play here. A future which holds widespread unemployment, even though technological progress has historically never failed to generate new opportunities, is hard for most to accept and plan for.

Inequality has been a matter of routine for most portions of human history. A large fraction of the super rich have been born into wealth, and it has only been in recent times  that the common man has been able to achieve parity with them through their own efforts. Since the post World War II period began, it has seemed but obvious that the reduction in inequality in various countries around the world has been a direct result of the political environment surrounding democracy and the policies that stem from it. But if one listens to Piketty, democratic and capitalistic principles don’t automatically lead to a reduction in inequality – this period was in fact an aberration rather than being the norm.

Like many other unifying theories, the development of a unified theory for capitalism has been the holy grail for a large number of economists in the past century or two. Rev. Thomas Malthus laid down the theory that the growth in population would keep the bulk of humanity trapped in poverty – and this was most definitely the case for most of human history. David Ricardo linked the value of a fixed amount of land relative to the expanding supply of other goods to the wealth of the landed aristocrats. And finally, Marx predicted that competition amongst workers and investors would drive down wages to levels that would offer bare sustenance, concentrating wealth in fewer hands.

What all of them failed to anticipate and account for was the fact that there was an explosion of productivity driven by new technology, which allowed the masses to insure themselves from the dystopic futures that had been imagined for them. This “fact” has become commonplace enough in today’s economic scenarios that no one has really debated its veracity.

Enter Piketty. With an impressive collection of data going back centuries to back his theory up, he argues that that the underlying mechanisms of capitalism are likely to reassert themselves, once again generating “arbitrary and unsustainable inequalities that radically undermine the meritocratic values on which democratic societies are based.”

There are two ways of thinking through this – the first is to determine how governments would deal with a situation like this, if it were to arise. Would a significant percentage of the population need to be supported by a welfare state? Can one then say that democratic states that adhere to a capitalistic model are actually driving themselves to a state of socialism? Mass unemployment is bound to cause social unrest at scale – what are governments to do then? Entirely new models of dealing with this would be needed. Are people thinking about this before it’s too late?

The second is about how we can check and overturn the events that are leading us down this path. Can we prevent the accumulation of wealth in the hands of a few, and prevent a class of rentiers – the small group of wealthy yet untalented offspring of the current generation which controls vast sections of the economy and strikes down competition from the talented but poor have-nots? In essence, are we saying that our economic future in a few generations will look like Europe before the First World War unless something is done about it?

Perhaps we are. So what should we do about it?

Piketty proposes is the introduction of a global progressive tax on individual net worth. Those who are just getting started in their careers would pay little, but those who have billions would pay a lot. This would not only make it easier for people to climb the ladder, but it would also inject transparency into the processes that drive global wealth dynamics by putting them under public scrutiny – as he mentions, “The lack of financial transparency and reliable wealth statistics is one of the main challenges for modern democracies”.

Sounds good on paper, but there’s more to it from a practical standpoint than meets the eye. As Tim Worstall in his excellent Forbes article points out, there is a real world barrier to how much tax can be extracted from the super rich, in the same way sales tax rates are bound by real world constraints.

Sales tax is levied at the point of retail such that the ultimate seller of the product can pay a regulatory authority a portion of the sale price. If we wanted to increase the sales tax on a given product, it couldn’t be done purely at the point of sale itself – we would have to levy it at every step it takes to manufacture that product so that every participant can recover the tax they’ve paid. This allows us to charge a pretty high tax rate (which is termed Value Added Tax or VAT) without seeing issues like tax evasion eat into the collected amounts.

An issue not unlike the one described above tends to occur when we try to levy higher wealth taxes. Countries like France do levy wealth tax at arond 1-2%, but they’re able to do this only  because the rate of return on capital is much higher than the tax rate, and the super rich are able to pay this out of their income, while maintaining their wealth.

What Piketty proposes is a tax that is much higher – so much so that it eats into the wealth itself. It’s almost like taking from the rich and giving it to the poor, except in a regulated and legal way. Robin Hood would be proud. And this is where we run into a vexing problem.

If a higher tax like this was imposed, it would mean that the super rich would need to give away money from their holdings to pay it. Assuming we were to set this tax at 10%, someone like Bill Gates or Warren Buffett would have to pay out around \$7-8 billion per year in taxes, meaning they would have to liquidate their wealth (which in most cases today tends to be locked into stocks, securities and other investments such as art or jewelry). The question now is – who buys this from them in return for cash? Stocks and financial instruments are relatively easy – there are enough organizations such as mutual funds that are willing to offer hard cash for them. But how do they sell immovable assets like property (after all, one can’t just sell 10% of a mansion), or priceless pieces of art? In trying to do this, we’re reducing the value of the items that are being sold, which in turn reduces the wealth of those who hold them.

Piketty’s book doesn’t hold answers to this question – but it is definitely different from the others in that it offers not just a set of guidelines to policy makers on potential solutions to stem the rate at which inequality is increasing, but also makes a call to people on the street to “take a serious interest in money, its measurement, the facts surrounding it and its history”. As he mentioned to an interviewer,

“It’s too easy for ordinary people to just say, ‘I don’t know anything about economics, but economics is not just for economists”.

Agreed. Even if his proposals don’t end up being actionable very soon in any real manner, he has started a public debate that I hope will have very real repercussions in the way we think about income inequality and ways to address it today and in the future.

## Thoughts on the Tablet era

Apple’s iPad has been the poster child of the “post PC era” ever since its inception. As the device has matured however, it has gained competition from practically every company that can build a hardware device, from Microsoft to Samsung. Its reviews have gone from praising it as the harbinger of the post PC era to how its interactions are broken to a point where it will never serve the generic handheld computing device purpose it was once slotted into.

At least by the media.

Steve Jobs knew this wasn’t going to be the case in 2010 when he said this in an interview,

When I am going to write that 35-page analyst report, I am going to want my Bluetooth keyboard. That’s 1 percent of the time. The software will get more powerful. I think your vision would have to be pretty short” to think these can’t grow into machines that can do more things, like editing video, graphic arts, productivity. “You can imagine all of these content creation” possibilities on these kind of things. “Time takes care of lots of these things.”

I agree with the sentiment. For a majority of the use cases, the iPad and others of its ilk will do just fine. But as we start to mature in our use of such devices, the simplistic interfaces that exist today just won’t cut it. What we need next are methods that make this device even more powerful than it is today – and that is by unleashing a whole new series of content creation paradigms.

Think about spreadsheets – Microsoft Excel for iPad has *just* been released – four years after the original iPad came out. And we still can’t run macros on it. Because of a policy decision somewhere in the Apple ecosystem, the most dominant end user programming language that comes with Excel is unusable on the tablet – which completely undermines one of the most powerful features that desktop Excel offers. And more importantly, not one spreadsheet with macros can run on the iPad – effectively rendering Excel for iPad useless for cross computer collaboration.

Lest one think spreadsheets are an isolated case, consider the work flow in writing this blog post and publishing it. Once I figure out what I’m writing about and what the essential facts I want to convey are, my flow is mostly split between composing text in a text editor, and using a browser to do research – gathering quotes, images, et al and somehow embedding it in the post. A trivial task on the desktop, with the availability of quick app switching, lots of screen real estate, and simple to use copy/paste. Not to mention having persistent storage on your hard drive. On the current tablet model, this simple task becomes needlessly complicated. The drawback of being able to run only one application at a time means that more time goes switching between apps than does in actually getting effective work done.

The next big revolution has to be in defining paradigms for these oft used, non trivial interactions in the touch world. The company or product that lights the way in doing so will capture a significant portion of mind-share and, hopefully, the market. Which is not to say there aren’t a few positive trends in this direction – Hopscotch, a programming application for kids that allows one to build an iPad app from within an iPad is quite excellent. For the first time, you can actually use the tablet to create content for it. But it’s early days yet.

This week saw a couple of interesting developments in the world of tablet computing though.

Microsoft released the Surface Pro 3 which, as per almost every review I’ve read so far, is being hailed as a laptop killer. After looking at videos, pictures and specs, I’m inclined to agree. It can run all kinds of native windows applications, offers a solid keyboard, a stylus for precision work and a form factor that makes it not appear as a compromise as Microsoft’s earlier tablets were wont to do. But one of the biggest disadvantages is that it tries to replace a laptop – meaning it offers a sleeker, thinner, lighter, touch screen enabled version of a traditional laptop that can compete in the ultrabook market. But there’s no innovation in the touch interaction arena there. In my book, that is a mistake.

Mary Meeker released her State of the Internet presentation, arguably the one presentation in the year which seems to be an event unto itself. In it, she presents a chart that blows away the recent meme of “tablets have peaked and are dying” – almost 80 million tablets were sold, which equals the combined numbers of desktop and laptop computers!

What this means is that all of a sudden, Microsoft has a tablet that rivals a macbook air in the kind of functionality it offers. You can run full apps on it, and it offers a trackpad to do finegrained manipulation. Apple on the other hand has an entrenched tablet that hasn’t really moved the needle recently in terms of game changing features, and offers watered down versions of full scale desktop applications that the Surface can run.

What we’re missing is someone to show the way on what the next generation of tablet interactions are going to look like.

## Nehru and Modi

Quoting Ramchandra Guha,

In his pomp — which ran roughly from 1948 to 1960 — Nehru was venerated at home Representative are these comments of The Guardian, written after the Indian prime minister had addressed a press conference in London in the summer of 1957:

A hundred men and women of the West were being given a glimpse of the blazing power that commands the affection and loyalty of several hundred million people in Asia. There is nothing mysterious about it. Mr Nehru’s power is purely and simply a matter of personality. … Put in its simplest terms, it is the power of a man who is father, teacher and older brother rolled into one. The total impression is of a man who is humorous, tolerant, wise and absolutely honest.’

Perhaps written unwittingly, those last sentences have the potential to become the guiding light to anyone who seeks to lead any group of people towards anything.

As Narendra Modi steps into the Indian Prime Minister’s role today, it would be wise of him to keep those sentiments in mind and look to guidance not from his immediate set of predecessors, but atleast in some respects, from the man who started it all.

## Of places and stories in our minds

It is the combination of things we remember that point out how certain places are special to us, hallowed by their unique features and our own experiences in them. It matters not whether we intended to go there, or whether a series of serendipitous choices led us there.

What matters is that there will always remain memories and thoughts that make such places important in our lives – they are not just physical locations anymore, but are defined by the veneer of history that everyone who goes there leaves on them. Embedded within these layers are the people we were with, the events that took place there, and those that almost did. There are landscapes and beaches, skylines and walking trails, restaurants and cafes and a host of other places that together with the dust and grime of the present grow to be places with character. They recount the fun conversations and stories by the bonfires on the beach, of shared campgrounds and hastily pitched tents, beautiful sunsets and walks on steep trails, jumping into hot tubs and drives across beautiful vistas, of wines tasted in the brilliant sun and dinners in lush riverside restaurants, of people met in passing that we may never see again and of friends made along the way who are today important influences in our life; of people telling us how lucky we were there at just the right time and of a sense of accomplishment of achieving things we never thought possible – or even considered doing, of messed up timings and missed dinners, of lying randomly on beaches and staring at starry skies, of shared food and localized disappointments, of train journeys and sudden passport checks within borders, of passing samaritans with offers of food and help, of breathtaking events and funny incidents, and of all the times just spent enjoying the moment, with past worries and future tensions becoming completely non existent.

These are memories within all of us which we can go back to retrieve, drawing them out wisp by wisp till something – be it a snatch of music on a passing station, the whiff of food on a campfire, a familiar perfume, the road sign pointing to a familiar location, the smell of eucalyptus, or just the mention of something that takes us back to a particular time and place – binds them all together and takes them from just being tenuous threads in our heads to being a solid, real mixture of events, interactions, people and places which drive our passions, soothe our hearts, shapes our experiences, and ultimately, make us who we really are.

We are, after all, nothing but the stories we create for ourselves.

## An Ode to Vikram Seth’s The Golden Gate

When the inimitable Mr Seth,
penned that beauty, The Golden Gate,
little did he dream that one day he would,
inspire a rhyme, that if it could,
serve as an ode to that gorgeous book,
and inspire others to take a look,

at a city he spied from across the bay,
its skyline rising on a gorgeous day,
from Indian rock out there in Berkeley,
or from the top of the campanile,
the fog framing its rolling hills,
lending its residents some shivers and chills,
and inspiring him, as if in a dream,
to voice his thoughts in a stream,
and pen a tale like none before,
one that would go down in lore.

When I first heard of this story in verse,
in iambic pentameter, and not at all terse,
I was in awe, as some thoughts arose,
grasping a book in poetry, not prose,
for the last of the epics that I knew with rhymes,
had been written in ancient times,
here was someone starting afresh,
and competing with the likes of Gilgamesh,
I decided then it was worth a read,
who knows after all, where it would lead?

and so one day, after a copy was mine,
I sat down to read, while it was still sunshine,
the pages, they went flying quickly past,
the next much more alluring than the last,
telling the tale with much charm and style,
with wit and verse taking it that extra mile,
the story of four friends, John and Jan,
Liz and Phil, and even Paul, the also-ran,
weaving the ups and downs of modern life,
of love and laughter, and of trouble and strife,
into a tapestry of colors bound together so well,
that the rhyme you read, must on it dwell.

The twists of fate they say have a will of their own,
and that you reap the seeds you’ve sown,
but I personally think these thoughts quite trite,
even though I may someday believe them right,
it’s hard not to get yourself drawn,
into the story, as it goes merrily on,
and pause to reflect on what things might’ve been,
if you yourself had been in the scene,

for, would you be that dreamer John,
on whom many a woman would fawn?
or perhaps you have all the charm and fizz,
of that lovable lawyer girl, Liz,
where would you be if your life was Phil’s,
trod upon, but bearing life no ills,
or for that matter, the sensible artist Jan,
making sculptures and paintings only as she can?

The tale is over then, it’s been sublime,
this quintessential californian novel in rhyme,
has done what it tried to strive
for, brought our four friends alive,
one is sad that this comes to pass,
the last page is finally turned, alas.

One day, walking around Dolores Park,
ideally of course, when it’s getting dark,
there is a spot where you can stand,
with someone you love, perhaps, close at hand,
and stare across, to the twinkling lights,
taking in the beautiful sights,
the bridge in the distance, all aglow,
zigzagging lights, a crown on show,

without you realizing all this while,
the wind blows from across the bay,
the trees in front of you lightly sway,
a fog horn in the distance calls,
and slowly then, a silence falls,
this enchanting city yet again enthralls,
a dreamer, but this time within its walls,
the golden gate looks on, from somewhere out there.

PS. With all due inspiration to Vikram Seth.

## Rain in the city by the bay

The skies of San Francisco have suddenly opened up in a torrential downpour, enveloping everything in sight and washing away the tiny pinpoints of light that dot the city in the cold embrace of an inky darkness. Outside my window, as I sit here writing in the warm environs of my living room, is a park across which in a small space between its boundary and the house next to it resides a homeless person.

He’s usually covered in plastics, some sort of light, a number of cushions and scavenged items in a shopping cart that I can only presume offer some protection from the elements. I generally try not to be affected by the plight of the homeless and the poor in this city, thinking about and eventually letting go of how unlucky they have been in life to be in the situation they’re in now.

But tonight, I can’t help but feel bad about what he must feel, huddled in the small space without a roof, trying his best to protect himself from the increasingly wild rain.

I can’t imagine the events that brought him to this, but I just wish life had been fairer to him.

## The rights of LGBT vs non human persons in India

In its quest to make the world a better place, the Indian Ministry for Environments and Forests released the following regulation a few months ago, abolishing the use of dolphins in marine circuses and advising state governments to reject any proposals to establish any enterprise that directly or indirectly supports the capture of cetacean species.

Whereas cetaceans in general are highly intelligent and sensitive, and various scientists who have researched dolphin behavior have suggested that the unusually high intelligence; as compared to other animals means that dolphins should be seen as ‘non-human persons’ and as such should have their own specific rights and is morally unacceptable to keep them captive for entertainment purpose.

There has been a lot of misinterpretation behind this – but let me state that just being “seen” as a non human person doesn’t immediately grant them the rights thereof. Not that this isn’t already a great step towards guaranteeing rights for animals so that they aren’t mistreated. Organizations such as nonhumanrights.org and others have welcomed this step and for good reason – barely any other countries follow this line of thought and I think it’s time they stepped up to do so.

The first impression on reading all the articles surrounding this statement was one of amusement, and a little bit of joy that finally, someone somewhere in the morass of Indian politics did something commendable on the world stage.

The very next thought jarred me though.

The Indian government has gone ahead and guaranteed special protections to an intelligent non human species, but has shown its inability to guarantee basic human rights to its LGBT citizens. I’ve noted elsewhere on this blog on why I think that was unacceptable – but seeing this in the light of that decision just makes the problems faced by the LGBT community in India that much more pressing.

## On Decriminalizing Homosexuality in India

The entire internet is ablaze with headlines that tout how morally repressive, unconstitutional and barbaric the Supreme Court of India has been in upholding a section of the Indian constitution that criminalizes homosexuality. What happens between two consenting adults is entirely their business – obviously, within limits that do not endanger either them or society as a whole.  How is it becoming of a country that terms itself as a secular, liberal democracy to pass judgment on this under the rule of law?

As the world’s largest democracy, India has the ability to set a shining example in dealing with issues that can influence the way the world thinks – the denunciation of this very law last year by the Delhi High Court is a great example and was a treat to read,

If there is one constitutional tenet that can be said to be underlying theme of the Indian Constitution, it is that of ‘inclusiveness’. This Court believes that Indian Constitution reflects this value deeply ingrained in Indian society, nurtured over several generations. The inclusiveness that Indian society traditionally displayed, literally in every aspect of life, is manifest in recognising a role in society for everyone. Those perceived by the majority as “deviants’ or ‘different’ are not on that score excluded or ostracised.

The Supreme Court however has slunk away from its moral responsibility, and adhered to a technicality by proposing that amending laws such as these are the responsibility of the legislature, and not of the judiciary. Surely, if it isn’t judicial overreach in protecting rights, upholding liberty, and issuing diktats in the past about everything from red beacons on official cars to the state of pollution in the city of Delhi, then this must not be so either?

What matters is not that this law hasn’t yet been repealed by parliament. What parliament thinks of this law is irrelevant because it infringes on the very basic rights that should be enjoyed by every citizen of the country.

What worries me is that the premier representative body of the people does not have adequate representation of the section of society that this law affects. Nor are a large majority of Indian lawmakers either interested or courageous enough to drive home an act that is bound to affect their mandate, especially if they have conservative and religious groups backing them. The bitter fact is that too often has the judiciary been made the single point of appeal to the wrongdoings and misrule of the legislature – and frankly, unless there are sweeping changes in the mindsets of those who sit in parliament, things aren’t going to change.

If anything, this should be a warning sign for everyone who thinks of the judiciary as a panacea for all ailments that plague the government – judges too have their biases, and in taking this judgment, the bench has definitely shown its inability to think outside of the narrow moral constraints that plague society. One can only hope that there will be some recourse in this decision, driven by groups that will definitely lobby against it. But one way or another, there is an urgent need to rectify this gaping travesty on the face of providing equality and justice to every citizen of India.