--- Piers Cawley <[EMAIL PROTECTED]> wrote: > In my quest to eliminate as many explicit conditionals from my code > as > possible, I found myself wondering if Perl 6's multidispatch > mechanism > would allow one to write: > > sub gmttime ( $time = time() ) is in_scalar_context { > strftime( $perls_default_time_format, $time ); > } > > sub gmttime ( $time = time() ) is in_list_context { > ... > } > > where 'in_scalar_context' and 'in_list_context' are place holders for > better syntax. > > Thoughts?
I think that if RFC 21 is approved (general-purpose C<want()>, with smartmatch flavors) the information to dispatch these should be available. OTOH, it also seems like this is asking for trouble, MMD-wise. =Austin