[Haskell-beginners] [x] and (x:_) for lists -- did you ever think that odd?
Tom Murphy
amindfv at gmail.com
Mon May 21 03:03:07 CEST 2012
On May 20, 2012 7:59 PM, "Ertugrul Söylemez" <es at ertes.de> wrote:
>
> AntC <anthony_clayden at clear.net.nz> wrote:
>
> > Would this pattern matching seem less odd?:
> >
> > head [x ..] = x
> > length [x, xs at ..] = 1 + length xs
>
> No, it seems and is more odd. Why hide the list constructors behind
> weird notation? Why require syntactic peculiarities and special cases
> for pattern-matching lists? In particular, what does pattern-matching
> against "enumFrom x" mean? Oh, it means something different here?
>
> Your proposed syntax is very arbitrary and helps to confuse everybody.
> Haskell has very simple syntactic rules, and I'm sure I'm speaking for
> most of the Haskell community when I say that we would like to keep it
> that way. We have access to the two list constructors (:) and []
> directly and they are very convenient, so there is no need for weird
> syntax just to enforce a set of ASCII characters in source code.
>
>
> > Experienced Haskellers need not answer: you've got too used to ( : )
> > ;-)
>
> Sorry, but this statement is very infantile. Even if meant as a joke,
> it's at best offensive and at worst insulting. There is good reasoning
> behind (:) and [], and just because you don't see it there is no reason
> to imply that experienced Haskell programmers are stubborn. Haskell
> programmers are about as open-minded as programmers can get.
>
I think it was just a joke.
> If you want people to take your proposals seriously, you shouldn't
> offend the very persons who evaluate them.
>
>
> Greets,
> Ertugrul
>
> --
> nightmare = unsafePerformIO (getWrongWife >>= sex)
> http://ertes.de/
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120520/ef63bfd4/attachment-0001.htm>
More information about the Beginners
mailing list