guile-user
[Top][All Lists]
Advanced

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

Re: Guix records


From: Dr. Arne Babenhauserheide
Subject: Re: Guix records
Date: Wed, 10 Feb 2021 09:38:16 +0100
User-agent: mu4e 1.4.15; emacs 27.1

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: signature.asc
Description: PGP signature


reply via email to

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