[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guix size reduction work group
From: |
Ludovic Courtès |
Subject: |
Re: Guix size reduction work group |
Date: |
Tue, 11 Feb 2020 15:15:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi,
Tobias Geerinckx-Rice <address@hidden> skribis:
> Ludovic Courtès 写道:
>> Nope (‘inherit’ is purely syntactic, it doesn’t “live on” at run
>> time.)
>> What would it buy you, though?
>
> In addition to what Gábor mentioned, ‘guix refresh -l’ rebuild numbers
> can be dangerously misleading when inheritance is involved.
>
> Would this not be useful information to record? When I was new here I
> played around with doing just that but my Guile-foo was too weak.
For this specific use case, I agree it would be useful info.
For the more general record use case, I’m skeptical because:
1. (foo (inherit (foo (a 1)))) would no longer be equal? to
(foo (a 1)), which makes little sense from a programming viewpoint.
2. The whole inheritance chain would be kept in memory, when in fact
‘inherit’ is nothing more than syntactic sugar to copy a record.
Maybe we could go fancy and augment ‘define-record-type*’ such that one
can ask for “inheritance reification”, but #2 sounds like that could
quickly make it impractical.
Ludo’.
Re: Guix size reduction work group, Pierre Neidhardt, 2020/02/08
Re: Guix size reduction work group, zimoun, 2020/02/10
Re: Guix size reduction work group, Julien Lepiller, 2020/02/10
Re: Guix size reduction work group, Ludovic Courtès, 2020/02/11