In the context of the FunC language, the three options define the concept of a pure function.
A pure function is a function that:
A) Only reads the values passed to it as parameters and does not access any external state. This means that its output is solely determined by its input parameters.
B) Can read values outside of the function parameters, but its output still depends only on the values passed to it as parameters. It does not rely on any external state or global data.
C) Can read values outside of the function parameters, but its output must be independent of any global data. This means that it should not use or depend on any global variables or data.
These definitions of a pure function help ensure that a function's output is predictable and consistent, making it easier to understand, test, and debug.
Practically:
a) ""impure"" modifier present - guarantees correct behaviour
b) ""impure"" modifier absent - FunC compiler will do strange things, such as strip out some code without your permission.
It will silently remove the function call in two cases:
a) function returns nothing:
() fun() { }
b) function returns something, but this something is not assigned to anything:
(int) fun() { return 5; }
...
int a = fun(); ;; fun is called
fun(); ;; fun call is removed"