In the computer
chris-martin.org
chris-martin.org
> When the machine executes my program, I expect that the Python interpreter will "call the function f".
But surely they're different functions? "I am calling f" because I'm adding a call to the source code, which is from my view essentially prose. Python is "calling f" because it has compiled the source code to bytecode and is starting evaluation of f in the bytecode. But Bytecode 'f' and Python 'f' are not the same function, even though they're related. Not that this necessarily follows from bytecode; even a pure-text interpreter would have a differentiation between "how the programmer sees the function" and "how the interpreter sees the function".
This seems equivalent to "do you move your legs, or do your legs move you?" Your high-level expectation of movement and your body's nerve impulses are related but distinct.
> This is not an unfamiliar task for a JavaScript programmer, who knows that one cannot get the value from a Promise — all we can do is set up plans for what to do once the Promise is fulfilled.
That still seems a distinction without a difference. The exact logic applies to function calls, which is to say it doesn't apply at all. One way or another, execution has to jump to the next piece of code. With lines, this process is just obfuscated a bit because flow text like code implies sequentiality.
edit: Hang on, I see what you mean. You can't get the value from a promise because there's a separate scheduler sitting on top of the CPU, so your program doesn't have exclusive control. (Inasmuch as it ever does in an interruptible multiprocess system.) This is more about "who owns the main loop" though.
> As a Haskell programmer, I'm not in a little globe on the desk; I live on the Earth and I type definitions.
Reminds me of compatibilism. I don't make decisions, I just calculate what the correct course of action is given my conditions.
> Maybe this one is just me, but I see the instance as a room, and the members as the stuff I have at my disposal when I'm working inside that room.
Yes, this is the point of lexical scoping as a tool for abstraction.
There is nothing on the article claiming that it even generalizes to other people, but my experience is the same, and I guess most people upvoting it agrees.
x = 2 * y + 1
which looks like algebra to me.I do not know Haskell, but I read about it that it is a purely functional language. So is the mindset because of that?