[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MzScheme and SML
>
>This interests me. Here is a quote from Andrew Appel of Princeton, one of
>SML's designers, commenting on SML's lack of macros:
>
> This is clearly an advantage, not a disadvantage. For the programmer
> to have to calculate a string-to-string rewrite of the program before
> any semantic analysis invites problems of the worst kind. Where macros
> are used to attain the effect of in-line expansion of functions, they
> are doing something that should be done by an optimizing compiler.
> Where macros are used to attain call-by-name, the effect can be
> acheived by passing a suspension as an argument; in ML this is written
> with the syntax fn()=> which though admittedly ugly is fairly concise,
> and is better than tolerating the semantic havoc wrought by macros.
>
> [From "A critique of Standard ML", 1992]
One other point, perhaps already noted: the paragraph reads well, but
dodges the question: his specific criticism of macros is confined to
the phrase "semantic havoc"; the rest of the paragraph is devoted to
explaining how to work around them. I've written many paragraphs
like this myself, and they've generally arisen when I am unable to
come up with a more detailed criticism.
Of course, I'm reading this paragraph out of context; the surrounding
text may address these issues more precisely.
john clements