unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: guile-user@gnu.org
Subject: Re: Does declaration order matter in guile?
Date: Mon, 13 Feb 2023 18:10:42 +0100	[thread overview]
Message-ID: <20599da7-0fa4-7b5d-a430-db18ae2fa2d9@telenet.be> (raw)
In-Reply-To: <Y+k0I0W+HfTYF1N3@ws>


[-- Attachment #1.1.1: Type: text/plain, Size: 813 bytes --]



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 #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

      parent reply	other threads:[~2023-02-13 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 18:46 Does declaration order matter in guile? wolf
2023-02-12 19:52 ` Taylan Kammer
2023-02-13  8:05   ` Sascha Ziemann
2023-02-13 10:44     ` Dr. Arne Babenhauserheide
2023-02-13 17:07     ` Maxime Devos
2023-02-14 20:00   ` wolf
2023-02-14 20:26     ` Dr. Arne Babenhauserheide
2023-02-13 17:10 ` Maxime Devos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20599da7-0fa4-7b5d-a430-db18ae2fa2d9@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).