Comment by eru

3 years ago

Yes. And, alas, you can't just allow a final trailing comma everywhere in Haskell.

Eg ("Foo", 2,) is different from ("Foo", 2) in Haskell thanks to TupleSections. For innocent bystanders: in Haskell ("Foo", 2) is the tuple you'd expect it to be. But ("Foo", 2,) is a function that takes another argument and creates a three-tuple. A Python equivalent would be

lambda x: ("Foo", 2, x)