Stack goes up, stack goes down …

So, I was having a conversation this morning about software stacks, and whether stack unwinding goes up or down. In particular, we often end up talking about whether one item is above or below another.

That’s natural enough language, on the face of it: after all, the physical metaphor of a stack is something along the lines of a stack of books, where one book naturally and physically sits on top of the previous one. Adding to a stack is literally putting something on top of it, a removal from a stack is physically limited to removing the top item.

But for some reason, I often find myself disagreeing with this physical metaphor when talking about software stacks: visually, I find that I cannot force myself to see a stack growing upwards. I’m reminded of Claudia Hammond’s Time Warped: Unlocking the Mysteries of Time Perception, and the notion of differences in human – and especially visual – perception of flows in time.

So I struggle with the notion of stacks growing up when things are added to them, and often query others when they talk about going “back up the stack”: “do you mean down?” to which they almost always reply “what? no – I mean up”.

So I’m curious now about recycling some rarely-used words that I myself only discovered through Terry Pratchett’s Discworld: the world being a disc, compass directions have a different sense, in at least two (three) senses of the word. Turnwise is – naturally enough- the direction of turn, and widdershins is its opposite. In fact, deasil is another opposite to widdershins, although I don’t recall Pratchett using it.

So in the spirit of extending the stack unwinding metaphor, and using the right-hand (or corkscrew) rule, I’m going to try this: stack unwinding is like corkscrew unwinding, which I will now call widdershins; its opposite is therefore deasil.

This feels easier now: all I have to do is remember an additional two or three things, visualize it in a kind of small finite projective geometry, and work my way through this post so that I can use the proper word.

One thought on “Stack goes up, stack goes down …

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s