Gábor Boskovits <boskov...@gmail.com> skribis: > the make-file-writeable function seems a bit too imperative to me, it would > look better if we could have a with-file-writeable function, so that we can > constrain the size effect, and more. Moreover if a file is read-only to > start with, it might be a good idea to keep it that way anyways. WDYT?
Now that I found the function in (guix build utils) (thanks for guiding me!), I see what you mean. ‘make-file-writable’ is imperative, true, but I’d say that file system operations are imperative in nature. A ‘with-file-writeable’ form would give a false sense of “containment” I think. Contrary to what the name suggests, its effect would *not* be limited to the dynamic extent of its body, in the current thread; instead, the effect would be globally visible on the system. Last, the style of (guix build utils) is a lesser concern in a way because its primary use case is package builds. All this code is “plumbing” and mostly imperative. So, all in all, I’d rather keep it this way. Thoughts? Ludo’.