logoalt Hacker News

dparktoday at 3:48 AM1 replyview on HN

Each move from one layer of the tech stack to a higher one involved a function:

      f(x) -> y
Given a specific x, you always get a specific y as the artifact being generated.

Not at all. If this were true then the Python code in question would generate deterministic binary. Of course that’s not what happens. The Python runs through an interpreter that may change behavior on different runs. It may change behavior version to version. It may even change behavior during multiple invocations of a function in the same running instance. Because all of that is abstracted away.

Same for the C code. You give up control and some determinism for the higher abstraction. You might get there same output between compilations on the same version but that’s not actually guaranteed and version to version consistent certainly isn’t.

Moving to a higher layer of abstraction very often results in less constrained behavior.


Replies

slopinthebagtoday at 4:44 AM

Can you explain how Python or C programs change from invocation to invocation?

show 1 reply