[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Slib-discuss] Incompatibilities Between Structures of SLIB and Gamb
From: |
Aubrey Jaffer |
Subject: |
Re: [Slib-discuss] Incompatibilities Between Structures of SLIB and Gambit |
Date: |
Wed, 27 Jun 2012 12:17:00 -0400 (EDT) |
| Date: Mon, 25 Jun 2012 17:48:44 -0500
| From: HN <address@hidden>
|
| The "structure" type (section 3.7 of SLIB documentation) and its
| Gambit's counterpart have the following differences (in order of
| decreasing importance):
|
| 1. SLIB uses an extra pair of parentheses around "name field" while
| Gambit 4.0 does not, e.g.
| * SLIB: (define-structure (name field ...))
| * Gambit: (define-structure name field ...)
|
| 2. The modifier's name is documented in SLIB as 'name-field-set!',
| but the example that follows and the implemented name is
| 'set-name-field!' ("set" is put first instead of last). Gambit
| documents and implements the former.
|
| 3. SLIB's version allows for default values while Gambit does not.
| However, this is not mentioned in SLIB's document.
|
| The first issue causes portability between SLIB and Gambit's code. We
| can change the source code of SLIB's "structure.scm" to match
| Gambit's, or we can comment out this feature in "gambit.init" to
| follow the SLIB's way.
The SLIB version was written in 1992 by R. Kent Dybvig. Can someone
familiar with syntax-case macros modify slib/structure.scm to accept
unparenthesized arguments?
Even better would be to modify it to accept both a parenthesized
argument and unparenthesized arguments, to be compatible with existing
code.
| The second can only be fixed by changing SLIB's file "structure.scm".
I have fixed this; the development version is updated:
http://groups.csail.mit.edu/mac/ftpdir/users/jaffer/slib.zip
Also, the CVS repository is updated:
https://savannah.gnu.org/cvs/?group=slib
It might be better to have it generate both old and new function
names for backward compatibility.
| The third involves documenting this feature.
Can you supply text for the documentation?