3 ms·
At least true functional languages have them, think Haskell. I do not know much (read: any) C, so I have a question: why does an argument that has never been g
by robinpokorny 9y ago
At least true functional languages have them, think Haskell.
I do not know much (read: any) C, so I have a question: why does an argument that has never been given a value make it impure?
- jepler 9y agoUsing an undefined value leads to undefined behavior under the C spec. This "undefined behavior" could be a visible side effect (in the helpful case, a diagnostic on stderr like when you're using valgrind on your program; in the unhelpful case literal demons flying out of your nose) and it need not be the same on each use of the undefined value either.
- jepler 9y ago.. some haskell implementations apparently had (practically) limited stack size, at least as of 2007, so as long as "pure" functions still allocate stack frames, it's possible for the result of the pure function call to be "stack exhausted" in one case and not another. https://mail.haskell.org/pipermail/haskell-cafe/2007-November/034017.html https://mail.haskell.org/pipermail/haskell-cafe/2007-Novembe...