[darcs-devel] [patch1267] changed the argument order of PatchSet and backward operators
Ganesh Sittampalam
ganesh at earth.li
Mon Jun 15 18:16:35 UTC 2015
On 15/06/2015 16:02, Ben Franksen wrote:
> Ganesh Sittampalam wrote:
>> On 14/06/2015 20:02, Ben Franksen wrote:
>>> Ganesh Sittampalam wrote:
>>>> On 14/06/2015 18:20, Ben Franksen wrote:
>>
>>>>> 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 (:*) ?
>>
>> I can live with that, though I'd prefer something less symmetric.
>
> We still have a problem with the operator names. I was wrong to say that the
> < and > symbols indicate the small and large arguments. I thought it was so
> and payed the bill just now before I finally realized that I was wrong.
>
> I had also not taken into account the +>+ and +<+ operators for appending
> FLs and RLs, respectively. With them there is no small or large argument. So
> the only intuition is that the direction is as in the corresponding FL/RL
> data constructor. If we also fix the constructor direction we'd get:
>
> :* pair
> :<: FL cons
> :>: RL cons
> +<+ FL append
> +>+ RL append
>
> i.e. exactly the opposite of what we have now =:|
Just to expand on one proposal of mine from earlier, how about
:> pair
:>: FL cons
:>>: RL cons (snoc)
+>+ FL append
+>>+ RL append
?
Ganesh
More information about the darcs-devel
mailing list