This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
what useable identifiers for cond-expand (SRFI-0)
- From: "Hoehle, Joerg-Cyril" <Joerg-Cyril dot Hoehle at t-systems dot com>
- To: kawa at sources dot redhat dot com
- Date: Mon, 20 Oct 2003 14:20:11 +0200
- Subject: what useable identifiers for cond-expand (SRFI-0)
Hi,
newer Kawas feature cond-expand (SRFI-0), however the doc doesn't seem to mention how to detect kawa itself in portable SRFI code.
Experimentally, I "discovered" the following:
#|kawa:429|# (cond-expand (kawa 123) (else 999))
123
However,
(cond-expand (jvm 123) (else 999))
999
[I set both kawa and jvm in my own cond-expand for Kawa-1.6.98 so as to be able to run (parts of) the SXML code.]
As a side note:
http://srfi.schemers.org/srfi-0/srfi-0.html
says <feature identifier>
--> a symbol which is the name or alias of a SRFI
I.e. symbols other than those identifying individual SRFI don't seem allowed.
Nevertheless, Oleg's SXML uses plenty of these forms to detect specific implementations, e.g.
(cond-expand
(scheme48 #f) ; ascii->char is built into Scheme48
(scsh #f) ; ascii->char is built into Scheme48
(else
(define ascii->char integer->char)
)
)
Please update the documentation and mention the cond-expand features that Kawa natively provides.
Probably implementations ought to define means to add to the feature list, e.g. if a user loads a srfi-NN implementation, foreign code should detect that properly: (cond-expand (srfi-NN #t) (else #f)) should yield true afterwards.
Regards,
Jorg Hohle.