Marc wrote:
> : The question: is it reasonable to expect (,y) to be a right section of
> : the (,) operator, or would this syntax break something (or perhaps lead
> : to confusing error messages)?
>
> I think it's because (,) isn't infix.
Well, not exactly... the comma `,' is infix in some sense, but really
it's a special form. I can see syntactically why it's not
automatically sectionable, but I agree with Lennart that it should be
made explicitly so.
> Furthermore
> [,y] := \x -> [x,y]
> [x,] := \y -> [x,y] look ugly:-)
Thought of this one. It's worse, actually:
[x,y,z,w,,u,v] == \ t -> [x,y,z,w,t,u,v]
But again, I see no reason not to allow this, other than that it places
an extra burden on compiler writers to give sensible error messages for
the case where there is a missing element in a list... the error should
say "perhaps you missed an element in the list" rather than "applied to
insufficient arguments".
--KW 8-)
>
> Regards,
>
>
> Marc
>