3 ms·
The fact that the order is switched implies that this isn't an equivalence relation. The word "is" has many English interpretations and doesn't adequately desc
by mightybyte 18y ago
The fact that the order is switched implies that this isn't an equivalence relation. The word "is" has many English interpretations and doesn't adequately describe what's going on. Logical implication is probably a lot closer here. I might rewrite it as "In Lisp, code -> data. In Haskell, data -> code." This is more about the converse of a statement than the symmetric property of an operator. A statement and its converse do exhibit some symmetry.
To understand what this means on the Haskell side, you need to learn about lazy evaluation and thunks.
- gruseom 18y agoI know what lazy evaluation and thunks are. I work with them every day (in Lisp, as a matter of fact). The problem with your statement is it isn't true. One might call it a sloppy overgeneralization, but even the thing it's sloppily overgeneralizing isn't true (as I explained: Lisp programmers use functions to represent data structures all the time).
- mightybyte 18y agoHow is it a false statement to say that Lisp allows code to be treated as data by virtue of its simple syntax, and that Haskell treats data as code because of its default to lazy evaluation implemented with thunks? That's all I'm saying. I thought this way of looking at it was an interesting contrast. I find the data structure-function half of the point less interesting.
- gruseom 18y agoOk! I like your first sentence there. It wasn't at all clear to me that that was your point. I'm not sure if I was being obtuse or you were being obscure or both - normally I'd go back and check, but I don't have time right now.