Liliana Marie Prikler <liliana.prik...@gmail.com> skribis: > Am Montag, den 22.11.2021, 14:27 +0100 schrieb Ludovic Courtès:
[...] > sexp->canonical-sexp is from the comment surrounding it a rather hacky > beast. I think (guile-)gcrypt could very well benefit from having a > better sexp construction API, but again that's outside the scope of > Guix. > > But since you're asking, I do feel there's a lot guile-gcrypt could > borrow from Guix, just not right now in an efficient manner thanks to > needing to jump through the sexp->canonical-sexp hoops. It could have > semantic constructors and field sanitization à la (guix records) for > example. WDYT? Fundamentally, Guile-Gcrypt is just bindings to libgcrypt. As such, it tries hard to remain close to libgcrypt’s API, and I think that’s a safe approach for bindings in general. Libgcrypt internally uses canonical sexps for key material, configuration options, etc. (an illustration of Greenspun’s Tenth Rule :-)), so that’s what Guile-Gcrypt exposes, and I think it’s fine. Thanks, Ludo’.