Hi, Tobias Geerinckx-Rice <m...@tobias.gr> 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’.