Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That doesn't help at all. These symbols don't have to be produced by the reader. All you need to do to get access to these symbols is to call FN once. That gives you a list whose first element is LIT and second element is CLO. So all you need to "stick a fork" in the Bel toaster is to be able to call FN and XAR.


Yes. In a nutshell, the problem is that (consp x) being true does not rule out (functionp x), which it should. (Unless consp is hacked in an unspeakable way.)

In a real implementation, you'd want a new kind of cons cell with a separate type tag so that it fails consp. It's okay if car and cdr like it.


> (consp x) being true does not rule out (functionp x), which it should

Exactly. That's what "punning lists" means.

> It's okay if car and cdr like it.

That's arguable. But the real problem is if XAR and XDR accept it. Functions, however they are implemented, should not be mutable. That way lies madness.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: