unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: proposal: with-file-writeable
Date: Thu, 15 Feb 2018 00:28:11 +0100	[thread overview]
Message-ID: <87wozfp2wk.fsf@gnu.org> (raw)
In-Reply-To: <CAE4v=pivoQXNjQqhK3xSZurCyhvj7zXnhjM-UVaRh5XHKO6Buw@mail.gmail.com> ("Gábor Boskovits"'s message of "Sat, 10 Feb 2018 22:50:04 +0100")

Gábor Boskovits <boskovits@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’.

  parent reply	other threads:[~2018-02-14 23:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-10 21:50 proposal: with-file-writeable Gábor Boskovits
2018-02-14 13:51 ` Ludovic Courtès
2018-02-14 19:13   ` Leo Famulari
2018-02-14 19:38     ` Gábor Boskovits
2018-02-14 23:28 ` Ludovic Courtès [this message]
2018-02-15  7:25   ` Gábor Boskovits
2018-02-15 13:22     ` Ludovic Courtès
2018-02-15 13:53       ` Gábor Boskovits
2018-02-15 14:16     ` Marius Bakke
2018-02-16  6:35       ` Gábor Boskovits
2018-02-16  8:40       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wozfp2wk.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).