guile-user
[Top][All Lists]
Advanced

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

Re: Does declaration order matter in guile?


From: Maxime Devos
Subject: Re: Does declaration order matter in guile?
Date: Mon, 13 Feb 2023 18:10:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0



On 12-02-2023 19:46, wolf wrote:
Also, I could not help to notice that when I use R6RS records it does work
regardless of the order:

     (use-modules (rnrs records syntactic))
(define (x y)
       (display (q-foo y))
       (newline))
(define-record-type q (fields foo)) (x (make-q "1"))

So, I have few questions I would like to ask:

1. When does order matter? What is going on here?

IIUC, the difference here between SRFI and R6RS, is that the SRFI tries to inline the constructor via macros -- in SRFI-9, 'foo' is a macro, whereas in R6RS, it is a procedure.

I also might be incorrect -- while I have once looked at the R6RS and SRFI records implementation, I might have misremembered.

Greetings,
Maxime.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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