chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] functions for hash tables


From: Alex Shinn
Subject: Re: [Chicken-users] functions for hash tables
Date: Thu, 27 Jan 2005 02:33:59 -0600
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Thu, 27 Jan 2005 09:16:35 +0100 (CET), address@hidden wrote:
> 
> On 26 Jan 2005, Ed Watkeys <address@hidden> wrote:
> 
> > When I started working programming in Scheme, I was amazed to find that 
> > there weren't any standard procedures that returned the implementation 
> > name and version. With such a mechanism, it would be much easier to 
> > re-define procedures to ensure that your MzScheme code will execute in 
> > Chicken.
> > 
> > (cond
> >   ((eq? (scheme-implementation) 'mzscheme)) ; do nothing
> >   ((eq? (scheme-implementation) 'chicken)
> >    (define hash-table-put hash-table-set)
> >    ; and whatever else...
> > ))
> > 
> > Providing a framework for this sort of porting solution is do-able,
> 
> And has been done: SRFI-0 (most Schemes define an identifier for
> their implementation).

For those Schemes which don't provide SRFI-0, or don't define an
identifier for their implementation, you can detect the implementation
automatically.  Below is a short procedure which automatically detects
21 of the most common Scheme implementations (others are easily
added).

  http://synthcode.com/scheme/detect-scheme.scm

-- 
Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]