Florian Gross
1/4/2005 11:30:00 AM
Yukihiro Matsumoto wrote:
> Hi,
Moin.
> In message "Re: Seeking info on keyword parameters"
> on Tue, 4 Jan 2005 19:16:33 +0900, "itsme213" <itsme213@hotmail.com> writes:
>
> |Will 2.0 make the names of keyword parameters available via reflection?
>
> Unlike your expectation, 2.0 keyword arguments will look like
> Python's. They are like "named optional arguments", rather than
> Smalltalk style method names.
Still, could we not add a method to Method objects that gives us more
information about the method signature then just how many arguments it
expects? I think it would be nice if we could somehow get the names of
keyword and regular arguments and the default value. Maybe an Array of
[symbol, type, default] where type would be something like :regular,
:keyword, :grab, :block_grab, :keyword_grab or nil and default and
symbol nil if not appropriate. While we are at it we could also add
Method#mandatory_argc.
I think that information could be extracted from the Node tree on-demand
so it would not have an overhead unless it is really used.
Does this sound possible? Would it be worth the effort?