unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
To: Taylan Kammer <taylan.kammer@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Guix records
Date: Wed, 10 Feb 2021 09:38:16 +0100	[thread overview]
Message-ID: <87lfbw5nd3.fsf@web.de> (raw)
In-Reply-To: <2c723161-6be9-26e0-dfc0-14e43cdda6fc@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]


Taylan Kammer <taylan.kammer@gmail.com> writes:

>>>    (import (rnrs records syntactic (6)))
>>>    (define-record-type (cat make-cat cat?) (fields name age color))
>> I did not know about that shorthand — thank you!
>> I always did this:
>> (import (srfi srfi-9))
>> (define-record-type <cat>
>>    (make-cat name age color)
>>    cat?
>>    (name cat-name) (age cat-age) (color cat-color))
>> Compared to that the syntactic form you showed is much nicer.
>
> I actually prefer the conceptual simplicity and explicit nature of
> SRFI-9 to be honest, but yeah, it can be very verbose.

I’ve used records a bit, and the additional overhead is annoying.
On the other hand I like it that there is an explicit entry in the file,
so I don’t get magic variables that my text editor cannot find without
executing the code.

> According to the 3.0 release notes, R6RS and SRFI-9 now both use a
> unified core record system under the hood and should therefore have 
> equivalent performance characteristics I suppose.

Thank you!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

  reply	other threads:[~2021-02-10  8:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 16:51 Guix records Olivier Dion via General Guile related discussions
2021-02-09 23:14 ` Taylan Kammer
2021-02-10  1:02   ` Dr. Arne Babenhauserheide
2021-02-10  5:37     ` Taylan Kammer
2021-02-10  8:38       ` Dr. Arne Babenhauserheide [this message]
2021-02-09 23:32 ` Aleix Conchillo Flaqué
2021-02-10  0:28   ` Olivier Dion via General Guile related discussions
2021-02-10 21:11     ` Aleix Conchillo Flaqué
2021-02-26 17:36 ` Ludovic Courtès

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=87lfbw5nd3.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=guile-user@gnu.org \
    --cc=taylan.kammer@gmail.com \
    /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).