On Fri, 9 Oct 2009, Xuesong Guo wrote:
> Pike support '|' in argument define:
>
> void look(Char|Room target);
>
> I suggest to support '&':
>
> void look(HasName&HasDesc target);
>
> Because for 'look', anything has a name and description is acceptable.
This syntax suggestion has been on the todo-list for quite a while (the
concept is actually fully supported by the low-level type-checker, and is
available to be used by functions implemented in C).
> Current in pike, we must add a new class Lookable{inherit HasName; inherit
> HasDesc;}, that is only for 'look' and not general.
>
> Xuesong Guo
--
Henrik Grubbström <grubba[at]roxen.com>
Roxen Internet Software AB
|