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?

Reply via email to