Fwd: Re: [Haskell-cafe] Wikipedia on first-class object

------- Forwarded message -------
From: "Cristian Baboi"
Like any type, only certain operations make sense on functions. Strings can be compared to each other for equality and written to a disk, and you can take the logarithm of a float, but none of those operations make sense for functions. In particular, two functions are equal only if they produce the same value for every input, and in general it is impossible for a computer to check that.
-Yitz
________ Information from NOD32 ________ This message was checked by NOD32 Antivirus System for Linux Mail Servers. part000.txt - is OK http://www.eset.com
________ Information from NOD32 ________ This message was checked by NOD32 Antivirus System for Linux Mail Servers. part000.txt - is OK http://www.eset.com

Cristian Baboi wrote:
I think I found the answer to why functions cannot be written to files. This is by design. Haskell must be free. Enabling writing functions to files, might make it ilegal in some countries. :-)
Ha, excellent! I imagine that is what Haskell must have been like before they invented the IO monad. It certainly was safer then. -Yitz
participants (2)
-
Cristian Baboi
-
Yitzchak Gale