5 ms·
C# isn't too terribly worse: aRect.Draw(x:50, y:50, width:10, height:21);
by noblethrasher 13y ago
C# isn't too terribly worse:
aRect.Draw(x:50, y:50, width:10, height:21);
- protomyth 13y agoI look at those commas and wonder why? Is there a reason other than "must keep separators from normal function call"?
- taternuts 13y agoit 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.
- noblethrasher 13y agoLabeled 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.
- masklinn 13y ago> 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.
- noblethrasher 13y agoTrue, 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)
- cema 13y agoOr, for that matter, Javascript, if you write it like this: aRect.Draw({x:50, y:50, width:10, height:21})