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

From the article:

> What is needed is a small, portable compiler that generates more or less "natural" C code with minimal dependencies and runtime system that supports at least the basic constructs of the language and that puts an emphasis on producing efficient code, even if some of the more powerful features of Scheme are not available.

Since C doesn't support continuations, it is not possible to have continuations and at the same time generate "natural" C code.

Consider how you would implement first class continuations. It's not possible to do CPS transformation (given the goal of natural code generation) - since that's a whole program transformation.



> Since C doesn't support continuations, it is not possible to have continuations and at the same time generate "natural" C code.

Since CHICKEN actually does this, I'll add the proviso of "without a GC or costly runtime".


I would call the code CHICKEN generates for "direct style" not "natural". (I know - it is a cop-out to use "natural" in quotes)

Regardless of what we call the style, it isn't simple any more.

For people interested in the internals of Chicken Scheme (I suspect sctb already knows):

https://www.more-magic.net/posts/internals-gc.html




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

Search: