2 ms·
Most of those changes might be seen as akin to going in to your Haskell interpreter and changing definitions in the standard library or something. (Environment
by schoen 6y ago
Most of those changes might be seen as akin to going in to your Haskell interpreter and changing definitions in the standard library or something. (Environment variable changes are weird because they are so local and ephemeral, but you still have to do them deliberately.)
Clearly not all command lines you can type in the shell are stateless (reading the disk, network, stdin, clock, or system RNG, among other things, isn't, and none of those things are rare or hard to do) and the shell doesn't specifically encourage you to write stateless code and it doesn't have a formal way to verify whether or not a particular command like is stateless or not. All of these properties are pretty similar to most popular FP language interpreters except for the last two. I guess it is a relevant distinction that your FP interpreter would typically know (as a matter of static inference) whether an expression is stateless, while your shell would typically not know.