[Prev][Next][Index][Thread]
Re: pattern variable coercion
On Sat, 6 May 2000, Gabor Greif wrote:
> While reading "Dylan Programming" I stumbled over coercion of pattern
> variables [e.g.,]
>
> define macro symbolize
> { symbolize(?:name) } => { ?#"name" }
> end macro symbolize;
>
> I could not derive this syntax from the BNF in the DRM. Is this a
> Harlequinism?
Nope, it's in the DRM, just not easy to find (like a few other things ;-).
See the production /name-string-or-symbol/, under /substitution/, under
/template-element/.
> .. AFAIK ##-style concatenation preserves the syntactical quality (being
> string, symbol or name) ...
Yes, it does -- see the section "Templates" in Chapter 10 of the DRM.
Hope that puts your mind at ease :-)
Hugh
References: