> 
>    > Is there any mileage in extending the syntax to allow the contents
>    > of an array or hash to be checked. In general I find quite often
>    > that I am checking to make sure that an array has at least N
>    > elements (ignoring issues with sparseness) and that a hash has a
>    > specific set of keys in it (see eg my PDL::Options module which
>    > translates user supplied keys [generally typed at a command line]
>    > into a set of keys the subroutine actually required [correcting for
>    > case and minimum matching]). It seems only a small jump to go from
>    > this RFC to a version that will peek inside the arguments [but it
>    > might be a can of worms].
> 
> A can of *vipers*, I think! We could push the envelope a *lot* further
> out than just peering inside arguments: regexes as type names,
> inter-parameteric context constraints, predicate dispatching.
> There's such a thing as being *too* powerful.


if we allow required _types_ then those types can insure their
validity (or sane default values)

Reply via email to