Re: [Scheme-reports] Standard Feature Identifiers are too low-level Bakul Shah (04 Jan 2012 20:29 UTC)

Re: [Scheme-reports] Standard Feature Identifiers are too low-level Bakul Shah 04 Jan 2012 20:28 UTC

On Wed, 04 Jan 2012 12:58:49 EST Marc Feeley <feeley@iro.umontreal.ca>  wrote:
>
> >  Feature testing is not aimed
> > at mobility, but at portability: it allows programs (and especially
> > libraries) to compensate for differences between applications.
> > For mobility, you need to test features at run time; hence the need for
> > a get-features procedure.
>
> I agree, but a more general get-features procedure would be interesting (i.e.
> one that allows more complex queries than checking features identifiers).
> Compare (memq 'cpu64 (get-features)) with (> (get-word-width) 32).

Note that there are individual differences in how a particular
feature may be implemented by a Scheme impl or its underlying
OS. Then there are things like `threads', which mean different
things to different people!

IMHO, what *would* help is a standard way of knowing a) the
name and version of the Scheme implementation and b) the host
OS, version and process arch. (and may be endian-ness).  It
would be nice if the host OS/version/arch is available at
macro expansion time as well. May be with something like
    #+<implementation>[-<version>]
    #+<os-name>[-<version>]
    #+<arch>[-<version>][-<endian>]

One problem with Scheme impl. is that access to host features
is partially implemented, if at all. For example, defining
FreeBSD as OS at most says I have definitely *no* access to
non-FreeBSD features and *may* have access to -some- FreeBSD
features! So the next level of elaboration may be to define an
OS (or more generally, environment) specific feature namespace
and not try to unify them across all environments (or assume
the same feature name means the same thing).  Users of a
specific OS can then standardize feature names for that OS (if
they care).

FYI, my interest is in programming in Scheme on plan9 (but not
exclusively in Scheme).  For that I am adding plan9 support to
Chibi-scheme & s9 and am quite aware of OS related issues!

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports