From: Nikolai Weibull Date: 2005-10-24T04:45:34+09:00 Subject: Re: A comparison by example of keyword argument styles Daniel Schierbeck wrote: > key = value > > foo(a = "foobar") > > pro: Looks clean and cool, even when the value is a symbol. > > con: May be hard to implement. Doesn't specify how you seperate named > and positional arguments (maybe use a keyword like "named"?). > def foo(a, b = "bar", named c = "default", **keys) It’s impossible to implement without breaking the current semantics of the assignment operator. To me, “a = "foobar"” reads very much like an assignment, not as an argument specifier, but one mans opinion is more or less irrelevant. If everyone can just get around the fact that passing symbols using keyword arguments will look a bit awkward, with the two colons in a row separated by a space, I really don’t see what the problem is. For every other case, I think that ':'+ reads a lot better than *'='*, or ⋮ ary.grep(/regex/, start: 5, end: 8) ⋮ over ⋮ ary.grep(/regex/, start = 5, end = 8) ⋮ Reading the latter, I find my brain wondering where start and end are being used in the code preceding and following the call to Enumerable#grep. In the earlier I don’t get the feeling that “start” and “end” are variables that are getting values assigned to them. nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}