public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alexander Berntsen <bernalex@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] unprivileged mode: generate PORTAGE_DEPCACHEDIR
Date: Tue, 11 Nov 2014 10:14:49 +0100	[thread overview]
Message-ID: <5461D389.3000804@gentoo.org> (raw)
In-Reply-To: <5461559F.2050808@gentoo.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 11/11/14 01:17, Zac Medico wrote:
> We could certainly express it in a way that doesn't involve any
> mutating loop control variables, but ultimately that's going to
> lead to more lines of code, and it will leave imperative
> programmers wondering why we didn't choose a simpler and more
> succinct approach.
> 
> For example, we could create an class for iterating over the paths
> from a given path down to the root directory. Then we could create
> a function which selects the first element from that iterator that
> exists. Once the class and function are implemented, their usage
> would be very succinct:
> 
> first_parent = first_existing(iter_parents(path))
I would greatly prefer this. But I suppose I'm in a minority. v2 of
the patch is fine by me.

- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlRh04kACgkQRtClrXBQc7Wg7AD/WmncYIvR/f6OZ9W2mVfpgMmL
pZRD+68xWgWTdvatodYBAIX9VfX/0kINsmV9RhzumhLnHYE7LMz43nLy+yrekbxp
=H68V
-----END PGP SIGNATURE-----


  reply	other threads:[~2014-11-11  9:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 23:24 [gentoo-portage-dev] [PATCH] unprivileged mode: generate PORTAGE_DEPCACHEDIR Zac Medico
2014-11-10  4:58 ` [gentoo-portage-dev] " Duncan
2014-11-10  5:28   ` Zac Medico
2014-11-10  6:06     ` Duncan
2014-11-10 11:09 ` [gentoo-portage-dev] " Alexander Berntsen
2014-11-10 18:21   ` Zac Medico
2014-11-10 20:32     ` Alexander Berntsen
2014-11-11  0:17       ` Zac Medico
2014-11-11  9:14         ` Alexander Berntsen [this message]
2014-11-15  5:19           ` Zac Medico
2014-11-15  7:21             ` [gentoo-portage-dev] [PATCH] unprivileged mode: use first_existing helper func Zac Medico
2014-11-17  8:12               ` Alexander Berntsen
2014-11-10 20:48 ` [gentoo-portage-dev] [PATCH v2] unprivileged mode: generate PORTAGE_DEPCACHEDIR Zac Medico

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

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

  git send-email \
    --in-reply-to=5461D389.3000804@gentoo.org \
    --to=bernalex@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox