20 Sep
2005
20 Sep
'05
7:43 p.m.
John Meacham wrote:
In Haskell, code is data too because code in the sense of imperative actions is described by IO values. You cannot analyse them.
And thus they are not data.
Huh? I'd say they are not /concrete/ data, but (abstract) data they surely are(?)
and you are certainly free to turn them into concrete data by creating your own data type which you then can inspect and modify and then "interpret".
IOW, you are free to write a Lisp interpreter in Haskell. But it's a lot easier to do it in Lisp. That, in a nutshell, is Lisp's key strength. It uses the same structure for code as for data, which makes it very easy to add new language features. -- Glynn Clements <glynn@gclements.plus.com>