behaviours

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Tue Jul 29 10:01:58 CEST 2003


Hi,

From: "Fredrik Linder" <fredrik.linder@REDACTED>
> As an example I'd have:
>
>  o One behaviour to list operational functions (start/stop)
>  o One behaviour to list administrative functions (set cache size/...)
>  o One behaviour for each other functionality (add user/remove user or
> permit_user/is_user_permitted or determine user violations (whatever))
>
> In this way I'd say that multiple behaviours are very desireable.

This use of behaviours is more or less the same as interfaces are used in other
languages.

> In the latter case I agree with Wiger - allow only one behaviour per module,
> but in the former case I am not - allow several behaviours per module.

True.

Just a thought that might open the can of snakes/worms/dragons : I think there
is a difference in semantics for the two usages, maybe it would be appropriate
to use different keywords? And also allow for more elaborate handling of
"interfaces", like extending them or resolving name clashes.

regards,
Vlad



More information about the erlang-questions mailing list