slib-discuss
[Top][All Lists]
Advanced

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

[Slib-discuss] Incompatibilities Between Structures of SLIB and Gambit


From: HN
Subject: [Slib-discuss] Incompatibilities Between Structures of SLIB and Gambit
Date: Mon, 25 Jun 2012 17:48:44 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.20) Gecko/20110804 Thunderbird/3.1.12

Hi,

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 second can only be fixed by changing SLIB's file "structure.scm".

The third involves documenting this feature.

--
Thanks,
HN

reply via email to

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