Email list hosting service & mailing list manager

Small modification Olin Shivers (10 Jul 1999 04:27 UTC)
Re: Small modification Richard Kelsey (12 Jul 1999 18:56 UTC)
Re: Small modification Olin Shivers (12 Jul 1999 20:35 UTC)
Re: Small modification Sergei Egorov (12 Jul 1999 21:23 UTC)
Re: Small modification Matthias Felleisen (12 Jul 1999 21:29 UTC)

Re: Small modification Matthias Felleisen 12 Jul 1999 21:29 UTC

How about the following modification:

 <command or definition>
   -> <record type definition>           ; addition to 8.1.6 in R5RS

 <record type definition>
   -> (define-record-type <type name>
        (<constructor name> <field tag> ...)
        <predicate name>
        (<field spec> ...))
   -> (define-record-type <type name>
        (<constructor name> <field tag> ...)
        <predicate name>
        (<field spec> ...)
	(<optional-field spec> ...))

 <field spec> -> (<field tag> <accessor name>)
              -> (<field tag> <accessor name> <modifier name>)

 <optional field spec>
	      -> (<field tag> <expression> <accessor name>)
              -> (<field tag> <expression> <accessor name> <modifier name>)

 <field tag> -> <identifier>
 <... name>  -> <identifier>

The value of the expression field in <optional field spec> is the initial
value of the optional field.

I understand that this rules out references to other fields but that's fine
by me. Someone can now build a more elaborate initialization syntax on top
of this srfi.

-- Matthias