|
|
|
|
|
by oaw-bct-ar-bamf
1775 days ago
|
|
I believe that this confusion comes from the avoidance of low level details.
A function is just a location in memory where instructions are stored. Returning a function is nothing else as returning a pointer to a memory location. 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).