advice needed about default arguments for a method
lecteur at zogotounga.net
Tue Dec 14 17:42:11 UTC 2004
Brian Rice wrote:
> Slate uses a language extension called optional keywords for this, where
> any message-send may pass along a number of &-prefixed keywords (read &
> as "with") and then ordinary expressions to override any defaults for
> auxiliary inputs. Each method can then define auxiliary inputs which it
> responds to and which can have default expressions to initialize them.
looks like lisp syntax...
> The auxiliary keywords can be passed in any order or combination. One
> tiny annoyance is that adding keywords to any message-send raises its
> arity to keyword-level instead of just binary or unary.
> It's an idea; don't know if you'll like it. We have gradually
> incorporated them more and more into the libraries and it has a pleasant
> effect on the protocols.
it could be exactly what I'm looking for. is this difficult to implement
in a current Squeak image ?
More information about the Squeak-dev