Paul Brannan wrote: > On Wed, Nov 12, 2008 at 06:01:40PM +0900, Brian Candler wrote: >> I think we actually just want: >> >> 1. the names of the arguments >> 2. whether each one is mandatory, optional, or splat > > Or a rest or block argument. > > (Or, in the future, a keyword or keyword rest argument) I'm leaning toward a wholly array-based structure that specifies all this but is future-proof... a couple examples def foo(a, b = 1, *c, d) => [[:req, :a], [:opt, :b, 1], [:rest, :c], [:req, :d]] def foo(a, (b, c)) => [[:req, :a], [[:req, :a], [:req, :b]]] And hypothetical keyword args, identified like symbols... def foo(a, :b, :c) => [[:req, :a], [:key, :b], [:key, :c]] I think just about all combinations of args can be specified this way, and since the structure is really fluid I'm not sure any concrete class could represent all possible structures. This also leans back toward Yehuda's original goal of a simple array-based structure without sacrificing the ability to express all combinations of args now and into the future. - Charlie