On Feb 25, 2009, at 10:22 AM, Sam wrote:
> I don't think the procedural macros in Dybvig's tutorial paper [1] are
> as hard as `map', `filter' and `foldr'. We just haven't found the
> write way to teach and present them yet.
With due respect, young one:
The Hitchhiker's Guide to the MetaUniverse taught all of PL with
macros. Once we had covered the first week, we couldn't stop students
from writing (extend-syntax) macros where functions were just fine.
I taught macros for 8 years at Rice at the sophomore and then the
freshman level. I do know how to teach define-syntax/syntax-case
to anyone who can cope with functions.
The reason we don't do it here is because the freshman course
must focus on design ideas that students can carry forward to
the 'language usually du jour' --- and that one never comes with
functional macro systems. We throw in HOFs as a teaser because I
have expected for 12 years that they will go mainstream. And mainstream
they will go. (Ever noticed that pattern matching is NOT in the
course either?)
You're right in a way you didn't spell out though:
What we do NOT how to teach is the
"best macro system in the world"
(thank you Dimitry, Media Lab).
We'll get there. And otherwise, you're 110% right.
Long live Ocaml, eh, Scheme. -- Matthias
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss