From: Mathieu Bouchard Date: 2001-06-16T08:37:24+09:00 Subject: [ruby-talk:16512] Re: Playing with Ruby Syntax (was: Initial thoughts about Ruby From a Smalltalk Programmer) On Sat, 16 Jun 2001, Dave Thomas wrote: > When keyword arguments are introduced, it's possible that we might be > able to get closer to Smalltalk too. I _think_ it's possible to parse > Ruby keywork arguments without requiring commas between them, and each > could potentially take a block. If I know how those keyword arguments actually work (vaguely like "=>" hash passing, plus checking on the names of the keys), then the problem might be that it's too close to a hash parameter to be truly smalltalkish. the defining feature of calling syntax in smalltalk is that it's the actual sequence of keywords that you are using that *are* the selector. method. The keyword-arg feature does not select which method is called, which means that you have to write that separately. Now, i'd like to know how all that stuff is going to be handled by the method on the receiving end... i mean, with possibly one proc per keyword argument, is that going to be a Hash (or Struct) of Procs ? And there are going to be argumentless keywords, because blocks don't count as arguments? Should "keyword arguments" be limited to arguments? What about "keyword arguments" as a data structure? Will "*foo" be sufficient to pick up keyword args? etc. matju