Re: [PATCH v4] config: add conditional include
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Aug 22, 2016, 13:32 UTC
- Message-ID
- <CACsJy8BokiiDbheN1_CqWWgK3xRn8YP30t7ojjVeDnok5_M4Ow@mail.gmail.com>
- In-Reply-To
- <vpqlgzp9bw1.fsf@anie.imag.fr>
On Mon, Aug 22, 2016 at 8:22 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:
Show 13 quoted lines
>>> I think the syntax should be design to allow arbitrary boolean >>> expression later if needed. >> >> I would be against that. We may extend it more in future, but it >> should be under control, not full boolean expressions. > > Why? > > I'm not saying we absolutely need it, but if we allow several kinds of > conditions (gitdir-is:... and others in the future), then it's natural > to allow combining them, and arbitrary boolean expression is both simple > and powerful (operators and/or/not and parenthesis and you have > everything you'll ever need).
For starter, we don't want another debate "python vs ruby vs lua vs ..." as the scripting language :) (for the record I vote Scheme! maybe with infix syntax)
Seriously though, for things that are evaluated in the background every single time a command is executed and things that come from many different places (/etc, $HOME, $XDG, $GIT_DIR) I think absolute flexibility just makes it harder to pinpoint when things go wrong. Combination in this case would be a bad thing, not a good one. By judging case by case before introducing a new condition type, we probably can see what sort of combination would be and whether we could accept that.
-- Duy