> could a case operator be overloadable?

C<case> isn't an operator, it's (half of) a control statement.
In a sense, the existing proposal already allows C<case> to be "overloaded".
If your switch value is a subroutine, then the C<case> value is passed
to that subroutine, which can then do...anything.

   > I know the conditional operator currently cannot be overloaded,
   > but it seems it should be possible. difficulty is another thing though.

I'm pushing for ?: to be overloadable in Perl 6.

Damian

Reply via email to