[darcs-devel] [patch1267] changed the argument order of PatchSet and backward operators

Ben Franksen ben.franksen at online.de
Sun Jun 14 19:02:41 UTC 2015


Ganesh Sittampalam wrote:
> 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.

Good. So let's talk about how to paint this particular bike-shed ;-)

>> 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.

Ok, I understand it now.

>> 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.

Perhaps someone else (Guillaume?) could chime in with an opinion?

> 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 :-)

... and still feels quite intuitive to me.

>> 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).

Right. So what about (:*) ?

Cheers
Ben
-- 
"Make it so they have to reboot after every typo." ― Scott Adams




More information about the darcs-devel mailing list