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

Re: Pains from duplicate field names [Miscellaneous loose ends]

This page is part of the web mail archives of SRFI 76 from before July 7th, 2015. The new archives for SRFI 76 contain all messages, not just those from before July 7th, 2015.

On Fri, 7 Oct 2005, Michael Sperber wrote:

Andre van Tonder <andre@xxxxxxxxxxxxxxxxxxx> writes:

- Why do the field /name/s in the procedural layer /not/ need to be
  I could see this feature causing lots of pain.

What kinda pain?

[... lots ...]

So I believe the positive rationale is that the field names might get
generated by a macro based on the number of fields, where it's
difficult to impossible (SYNTAX-RULES) or awkward (SYNTAX-CASE) to
generate unique names.  You got any answers for that?

I don't quite understand. In this case, could you not generate the names at runtime when executing make-record-type? Since with the current SRFI, your hypothetical syntax-rules macro presumably will use the same name for all the fields, the symbolic names cannot matter and you'll have to do positional indexing anyway.

I believe something stronger than syntax-rules has to be available anyway just to implement this SRFI, but that's probably beside the point :-)