James G. Sack (jim) wrote:
I know very little about functional programming, but I keep getting
stuck on claims that assume the absence of side effects. Is code that
has side effects (eg, any i/o) not allowed IN a function by some kind of
formality? Is side-effects stuff forced into some special code artifact
that is outside the meaning of _function_ -- or what?

Yes, side effects are forced into a special code artifact. The key seems to be keeping the purely functional internals of your program separate from the messy side effect dependent externals of the program. That way you can make certain guarantees about how the internals of your program will work which seems like a win to me. Keeping these worlds separate seem to be what Haskell uses monads for.

--
Tracy R Reed                  Read my blog at http://ultraviolet.org
Key fingerprint = D4A8 4860 535C ABF8 BA97  25A6 F4F2 1829 9615 02AD
Non-GPG signed mail gets read only if I can find it among the spam.

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to