[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introspection




> I'm trying to design a "portable" function to determine at run-time
> the implementation (Gambit, Chez-Scheme, Bigloo, etc) that is running
> the code (how's that for a paradox!).

There is something about this that reminds me of:

    Anyone who considers arithmetical methods of producing random
    digits is, of course, in a state of sin. -- John von Neumann

You could inspect the numeric tower implemented: things like
(exact? (/ 2 3)) and (exact? (fact 100)).

You could test the rules implemented for top-level macro scope (LET,
LET*, etc., to use Clinger's terminology).

You could print a procedure to a file, read it back as text, and see
what syntax it uses.