
3 Feb
2007
3 Feb
'07
8:04 p.m.
On 2/3/07, Brian Hulley
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:
(1,2,)
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