Re:Remember Smalltalk? (2008)
by noblethrasher on Wednesday February 12, 2014 @02:35PM
(#7226705)
C# isn't too terribly worse:
[ Parent
| on HN ]
I look at those commas and wonder why? Is there a reason other than "must keep separators from normal function call"?
Re:Remember Smalltalk? (2008)
by noblethrasher on Wednesday February 12, 2014 @03:27PM
(#7227032)
Labeled parameters are optional. In fact they're so optional, that you don't even have to label all of the parameters at a call site (just the ones that appear after the first labeled parameter).
So with that (mis)feature, eliding commas would make a lot of code harder to reader.
> So with that (mis)feature, eliding commas would make a lot of code harder to reader.
Not really. Lisps get by without them and it doesn't have formal keyword parameters.
Re:Remember Smalltalk? (2008)
by noblethrasher on Wednesday February 12, 2014 @03:51PM
(#7227186)
True, but that's an advantage of Lisp's uniformity. Imagine passing a query comprehension (or two) as arguments.
Foo(from n in range select n * n into: from n in range where n % 2 == 0 select n)it kind of helps me visually dissect the parameters better - I'm sure if I got used to omitted commas it wouldn't be that big of a deal. When I would run into ruby code that omitted the parenthesis on a function call, it was considerably tougher to read for me.