List syntax (was: Re: help from the community?)
taralx at gmail.com
Sat Feb 3 15:04:34 EST 2007
On 2/3/07, Brian Hulley <brianh at metamilk.com> wrote:
> Of course, but when I said "error" I meant "error with respect to the
> intentions of the programmer" not "syntax error detected by the compiler".
> The problem with your proposal is that if optional trailing commas were
> allowed, if *I* wrote:
> by mistake, forgetting to add in the last element, the fact that the
> compiler would now treat the trailing comma as optional means it would now
> accept the code as being syntactically ok.
And invariably your code would fail to typecheck. That makes this a
lot safer for tuples than for lists, for example.
Taral <taralx at gmail.com>
"You can't prove anything."
-- Gödel's Incompetence Theorem
More information about the Haskell-prime