What #,(foo) does tell, and what it does not oleg@xxxxxx (06 Oct 1999 19:01 UTC)
Re: What #,(foo) does tell, and what it does not Marc Feeley (06 Oct 1999 20:57 UTC)
Re: What #,(foo) does tell, and what it does not Richard Kelsey (07 Oct 1999 14:35 UTC)

Re: What #,(foo) does tell, and what it does not Marc Feeley 06 Oct 1999 20:56 UTC

> Now consider
>         (cond-expand
>          ((and srfi-4 srfi-10 srfi-10-4)
>           (define sample-vector '#,(f32 1.0 2.0 3.0))))

Note that mixing "cond-expand" and "#,(...)" as in this example is not
a good practice.  That is because "#," operates at read-time and
cond-expand operates later, at macro-expansion time.  So the
constructor for f32 will be executed regardless of the presence of
srfi-4, srfi-10, and srfi-10-4 (and if "#," is not supported by the
reader, you will get a reader error).

The "#," mechanism requires the user to understand yet another level
of compilation and the time when it is performed (and the model is
already not that simple if you consider forms like "(load ...)",
"(include ...)", and "(eval ...)", and the REPL).

Marc