Re: more sub introspection than arity()

2007-12-22 Thread Jonathan Worthington
Klaas-Jan Stol wrote: maybe it'd be useful to allow introspection for that as well? maybe a sub can be requested for i ts complete signature, which then returns a some object describing that signature. (how many params, is it a vararg function, how many optionals, etc) Writing a method to re

more sub introspection than arity()

2007-12-22 Thread Klaas-Jan Stol
it is not uncommon to be able to ask a function (in languages of interest to parrot) to ask whether it takes a variable number of arguments, i.e. it has a slurpy parameter. I think it'd be useful to have such a method on the sub pmc, for instance "is_vararg()". Whether it should only check for a :