"Pit Capitain" <pit / capitain.de> wrote in message
news:41DB0D2C.8010103 / capitain.de...
> Yukihiro Matsumoto schrieb:
> > I assume you are suggesting Smalltalk style
> >
> >   foo.move a from: b to: c
> >
> > method invocation which mentioned by itsme.  I'm not positive that it
> > fits in Ruby.  How can I specify such a method by a symbol, for
> > example?
>
> I think in Objective-C and Smalltalk the method name would be
"move:from:to:".
> So in Ruby the Symbol would be :"move:from:to:".

Seems like that would work. Also seems loosely consistent with the new {foo:
x, bar: y} syntax for symbol keys.

Will keyword invocation syntax permit leaving out the parenthesis? i.e.
    foo.move( a, from: b, to: c)
as well as
    foo.move a, from: b, to: c
?

If a subclass of Symbol like SelectorSymbol also had a @namespace slot to
provide selector namespaces (which would be great with Ruby's modules and
re-opening of classes; SmallScript does something similar), we would also
need some way to associate a namespace with a selector symbol. e.g.
    x.send :move  # which namespace? symbol or selector symbol?
    x.send N1::move # ah, N1's :move selector symbol
    x.send :move # send could treat :move symbol as default_ns::move
selector symbol?