On Sun, May 20, 2012 at 5:14 PM, AntC <anthony_clayden@clear.net.nz> wrote:
Would this pattern matching seem less odd?:

    head       [x ..] = x
    length     [x, xs@..] = 1 + length xs


Experienced Haskellers need not answer: you've got too used to ( : ) ;-)

You missed experienced Lispers, who are likewise entirely comfortable with cons-like notation.

I would want to very carefully check the implications of your suggestion:  it might not integrate well with the rest of pattern matching syntax, in particular some uses of it might turn out to be impossible to distinguish from existing constructs.  Some parts of Haskell's syntax are rather, how shall I put it?  tightly reasoned, with less room for expansion than is immediately obvious.

(Please note, I am not trying to say "don't bother", I am saying that the syntax questions really are tricky and you need to work carefully.  This syntax might end up being fine, or it might need to be worked somewhat differently.)

--
brandon s allbery                                      allbery.b@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms