From: Mike Hall Date: 2002-07-24T00:46:37+09:00 Subject: Re: Syntax "surprise" Yukihiro Matsumoto wrote: > In message "Re: Syntax "surprise"" > on 02/07/18, Brad Cox writes: > > |Its not a language's business to prevent users from writing "smelly" code. > > Despite I agree with this principle most of the cases, I'm not sure > whether allowing trailing comma in argument list enhance / reduce > astonishment, considering most of popular languages (except Perl) does > not allow trailing comma. I agree that trailing commas are strange. A comma means something, to the language and to people who read a script in that language. A trailing comma means something is missing. If I could raise a similar issue, I noticed this in the 1.6.7 TODO file: - compile time string concatenation, "hello" "world" => "helloworld" I know that some other popular languages like to do that, but I think it would be better to leave it as two arguments. After all, someone wrote those two literals separately on purpose. I would even go so far as to make commas optional, if that is possible. (other popular languages use white-space delimiters: sh, Tcl, Lisp) There would be less symbol clutter, and the script might be easier to read. obj.method a, b, c {|i| xyz} vs obj.method a b c {|i| xyz} obj.method "a", "b", "c" vs obj.method "a" "b" "c" Just something that would make Ruby even better, I think. -- Mike Hall http://www.enteract.com/~mghall