> But understanding variables and functions, pointers and recursion? I can't see it.
Hey, I'd argue that understanding exactly those things are what should be included in "everyone should learn to code". All of those are difficult mental constructs important for understanding how our complex world works. Let's look at it case-by-case:
variables - this is basic; the idea to take something (a concept) in your hand and manipulate it by a symbolic name. This is, in some way, taught in high-school math, but somehow many people don't seem to grasp the idea behind the concept of a variable.
functions - ability to take a set of instruction and name it. Possibly have it parametrized. That's simple. But naming several sets of concepts, and then using them to build another layer of concepts, which is then used to build another layer of concepts... I'd call this an essencial problem-solving skill.
pointers - concept of indirection; for people not accustomed to it, it's easy to get lost in different levels of indirection when discussing things (like, a difference between 'belief' and 'belief in belief', or P, proof of P, proof that P is provable, etc.)
recursion - because not everything circular is invalid; sometimes things defined in the terms of themselves are the simplest way to go.
To all of this I'd also add one more, IMO essencial, thing - understanding of feedback loops. It could cut out a lot of discussions about whether X causes Y, or Y causes X. Surprise surprise, it might be a feedback loop, in which X and Y are interlocked, and are both to blame.
Bottomline, programming teaches us a lot of important skills and mental constructs useful for problem-solving and understanding how the world works. And those skills are hard to get elsewhere.
A silly example from high-school biology: what is genetic code if not opcodes for protein assembly machinery? DNA "data" is code that programs machines building proteins. Easy to understand and remember if you know even a little bit about how 'automation'/'computing' is done.