Hello, Tomas Volf <[email protected]> skribis:
> Hm, and when I stop/start inhering, the set of safe identifiers changes, > because this binding is injected only when inheriting, correct? Yes. > True, and I am not fan even of this part of Guix's records. Though > until now, all shadowing was happening explicitly on the screen. Now, > whether something is shadowed changes whenever the thunk-ness changes, > without it being visible in my code. I fully admit I do not like that. Fair enough but it’s been this way since 2012. :-) > I admit I do not like this feature, it feels way too magical and way too > unpredictable. > > (let ((version "1")) > (package > (inherit foo) > (version version))) > > What will package-version give me? "1" or (package-version foo)? There > is no way to know, based on the source code nor the documentation. I > have to dig into guix/packages.scm and consult the record definition. > And hope no one will change it in the future. ¯\_(ツ)_/¯ Yeah. > Out of curiosity, was it ever considered to do away with the whole > (thunked) concept, and instead switch to explicit procedures taking the > record instance? Nope! Never. Thunks are necessary to delay computation and to support things like conditions on (%current-system). https://arxiv.org/abs/1305.4584 The goal from day 1 has always been to allow for declarative package specifications that “look” obvious and have as little boilerplate as possible. All the decisions were guided by this, including the removal of input labels: https://guix.gnu.org/en/blog/2021/the-big-change/ I hope it clarifies how we got there! Ludo’.
