News for hackers. Stuff that matters.
Re:Show HN: Compiler Fundamentals – Closure Conversion by disconcision on Monday February 18, 2019 @12:25AM (#19188806)
this is just a tiny nitpick but I'm wondering why you didn't use pattern matching? if you just wanted to stay schemey then disregard but you could skip the entire shapes section and the rest of the code would still be terser, e.g.

    ((begin? exp)
    `(begin . ,(mapply cc (cdr exp) sc)))
would become

    [`(begin ,xs ...)
     `(begin ,@(mapply cc xs sc))]
or if you're feeling fancy

    (define cc-sc (curryr cc sc))

    [`(begin ,(app cc-sc xs) ...) `(begin ,@xs)]

There are no comments on this comment yet.