3 ms·
Funny this should show up, since I am just in the planning stage of implementing common lisps "tagbody" in scheme. It is mentioned in the article, but not reall
by bjoli 8y ago
Funny this should show up, since I am just in the planning stage of implementing common lisps "tagbody" in scheme. It is mentioned in the article, but not really explained. It is a neat little localised goto that is explicit. You can only jump withinthe tagbody.
Why is this useful? Well, goto is a nice little primitive for some things. Tagbody is used in CL to implement the iter (and maybe loop) macro. Because sometimes all you want is unconditional jumping around :)
- AndruLuvisi 8y agoOriginal author here. Funny you should mention that. I once made an attempt to do the same. You can find it at http://web.sonoma.edu/users/l/luvisi/scheme/prog.scm http://web.sonoma.edu/users/l/luvisi/scheme/prog.scm One fun thing about this implementation is that labels can be passed to other functions, or returned from functions, and even used to jump back into functions that have already exited, since they are based on continuations. Good luck!