In languages like Java that want to hide everything memory related I also was struggling with grasping what a function really is. Is it even allowed to return a function?
Languages that hide memory locations and direct memory access are one of the reasons that some programmers are struggling with functions returning functions.
I'm not capable at all with assembler, can't write my own compiler.
But my model of how a computer works, in my head, is "functions are just sequences of bits arranged as CPU instructions." I know how it works, even though I can't write a compiler or parser.
And it's absolutely essential to how I program, even in the highest level languages (SQL explain plans).
That depends. If the language supports proper first-class functions, it's basically an instruction pointer plus a record of the variable bindings the function code is "closed over" (i.e. parameterized on). Many languages do support this nowadays.
Huh. I suppose the modern-day equivalent is commonly done with higher-order functions - in particular, callbacks, CPS and returning functions. I've worked with people who find this confusing (particularly the last one - functions returning functions).