4 ms·
Scheme already had macros in 1975 [1] SICP was first published in 1984 [2] [1] https://stackoverflow.com/a/69261645/3414663 https://stackoverflow.com/a/692616
by nemoniac 4y ago
Scheme already had macros in 1975 [1]
SICP was first published in 1984 [2]
[1] https://stackoverflow.com/a/69261645/3414663 https://stackoverflow.com/a/69261645/3414663
[2] https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs https://en.wikipedia.org/wiki/Structure_and_Interpretation_o...
- throwaway81523 4y agoThat says (some) implementations had macros from the beginning, though those macros were much different than what was eventually standardized in (I think) r5rs. I guess I can believe that. I don't know when Guile got macros. Philip Wadler's paper discussed and linked from here is also interesting: https://www.wisdomandwonder.com/link/1055/why-calculating-is-better-than-scheming https://www.wisdomandwonder.com/link/1055/why-calculating-is...
- lispm 4y agoSICP was largely written before Scheme was standardized and before SRFI existed. For example SICP uses a so-called special form called cons-stream, which is in no Scheme definition (it was in no Scheme reports) and for which no implementation is given in the book, since it can't be implemented by the Scheme subset used for the book. It assumes that it is somehow provided without giving any details. Related: https://srfi.schemers.org/srfi-216/srfi-216.html https://srfi.schemers.org/srfi-216/srfi-216.html
- throwaway81523 4y agoThanks, yeah ok, it hadn't occurred to me that cons-stream has to be a macro. I also remember the book also explaining how force and delay work in terms of wrapping and later evaluating a lambda, but don't remember if it explained that delay has to be a macro too. I guess the Common Lisp approach to macro hygiene is using gensyms for temporaries, but Schemers saw that as too ugly. I wonder how Clojure does it. I'm not that big on Scheme or Lisp these days anyway though.
- lispm 4y agodelay is mentioned to be a special operator, too.