[darcs-devel] [patch1267] changed the argument order of PatchSet and backward operators
Ganesh Sittampalam
ganesh at earth.li
Sun Jun 14 18:04:28 UTC 2015
On 14/06/2015 18:20, Ben Franksen wrote:
>
> Ben Franksen <benjamin.franksen at helmholtz-berlin.de> added the comment:
>
> I think we agree that the syntactic order should always indicate
> application order, i.e.
>
> a :: A x y, b :: B y z
> ----------------------
> a `op` b :: C x z
>
> with suitable A, B, and C. This is what my order reversal patch started
> and what eliminating :< finishes (I think). So far so good.
Yep.
> Now what to do about the naming?
>
> I am unsure what you mean with "where the context is" and why you think
> this is relevant.
I mean that '>' should also indicate application order - I think I meant
to say something like "how the contexts are ordered".
That does mean it's redundant, since we now always have the syntactic
order to indicate that. But I still feel it would help to make
expressions more readable.
> My idea was to interpret the < and > symbols to indicate where the
> "small" and the "large" thing is (a list is a large thing, a single
> element a small one). When using ordered pairs (the :> operator) there
> is no small or large side: one can have a single patch or a sequence on
> either side. So the symbols < and > don't feel right to me.
I guess that part of my wish to use '>' to indicate application order is
that it's what we did before so I'm used to it. But also I think I like
that it helps indicate asymmetry, in that you can't swap the arguments
in a directed tuple purely because of the contexts.
I also just remembered that we still have the "parallel" operators :\/:
and :/\: that indicate "convergence" with the arrows - the pointy end is
where the patches have the same context. Hmm, I guess that doesn't fit
too well with the '>' notation :-)
> I am not wedded to :- (I agree that sometimes it looks weird, especially
> with _ on the RHS i.e. p :- _). We could as well use :|: or :* (the
> latter is often used for product, so that might give people an intuition).
:|: wouldn't work well, because we have :||: for parallel pairs (pairs
of patches with the same starting and ending contexts).
Cheers,
Ganesh
More information about the darcs-devel
mailing list