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

I had this dumb idea of actually evaluating LISP in a forth inspired way. It would be a stack of subroutine/accumulator pairs. so given

    (+ 1 2 3)
"(" would pop an pair on a stack, + would set its subroutine, and 1 2 3 would be fed to the subroutine and accumulate a value. when ) is encountered, the data is fed into the subroutine/accumulator pair lower on the stack, so you could still have nesting.

Horribly inefficient, but I thought the idea was neat. I'm sure I'm not the first to think of it though.



some antique famous lisper (Henry .. forgot last name) did write a linear lisp that works by stack evaluation. From the few that I grasped, since everything is mostly duped, it's like a new value each time; free borrowing ?




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

Search: