On 2007 Feb 2, at 12:13 PM, Kirsten Chevalier inquired:

On 2/2/07, Douglas Philips <[EMAIL PROTECTED]> wrote:
I assert that the trailing comma is a feature, not a programmer
forgetting "the last element", and that this
is already explicitly allowed, as per the syntax fragments already
quoted, repeated here for convenience:

-- from: http://www.haskell.org/onlinereport/syntax-iso.html#sectB.4
impspec -> ( import1 , ... , importn [ , ] ) (n>=0) | hiding ( import1 , ... , importn [ , ] ) (n>=0) exports -> ( export1 , ... , exportn [ , ] ) (n>=0)


Huh? I don't quite see what you're getting at here. The report says
that the trailing comma is allowed in import and export lists, yes.
But you were talking about trailing commas in lists and tuples, which
would be a change to the existing language, not something that's
"already explicitly allowed". Can you clarify what you meant?

Hmmm...stated another way:
I am proposing that the list and tuple syntax change to be consistent with the import and export syntax. The argument that a trailing comma "means" "the programmer forgot the last item" in a list / tuple is inconsistent with the deliberately explicit permissiveness of a trailing comma in the import / export lists. In the import / export lists such a trailing comma does not mean "programmer forgot additional thing at the end."

        --D'gou

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to