3 ms·
You can still step through functional code an examine local variables, you just have the assurance that the values of any local state are purely dependent on th
by rhines 5y ago
You can still step through functional code an examine local variables, you just have the assurance that the values of any local state are purely dependent on the inputs to the function and not any other external state. So it's ultimately easier to debug - any values that affect the operation of a function are explicitly set when calling the function, and you don't have to worry about figuring out ways to ensure that runtime-generate state matches whatever it was when the error originally occurred.
- tabtab 5y agoIn theory you wouldn't have many "local variables" if you followed functional practices. Re: "you just have the assurance that the values of any local state are purely dependent on the inputs to the function and not any other external state." I don't see that principle helping much in practice.