behaviours

Thomas Lindgren thomasl_erlang@REDACTED
Thu Jul 31 11:00:36 CEST 2003


--- Vlad Dumitrescu <vlad_dumitrescu@REDACTED>
wrote:

> I think [backwards compatibility] is why COM and
> CORBA (I think) had to
> resort to incomprehensible
> unique identifiers that change with the slightest
> change of the interface... One
> can't just say "I implement interface X", but
> "interface X version Y" and with
> several developers it gets easily out of hand. And
> what if someone doesn't
> update the version? Ouch!

It's a bit nasty, but perhaps a greater problem for
COM or CORBA (since I suspect they integrate more
pieces of independent/legacy software than Erlang. At
least at this time :-).

What to do in Erlang? A simple approach might be to
detect that multiple versions are required when a
release is created and disallow it, or warn.
"Lint-like" handling, if you will.

A second approach: you specify "-behaviour(B, Vsn)."
when you don't want the latest one, and extend the
behaviour definition with:

behaviour_info({callbacks, Vsn}) -> ...

for the legacy cases. The behaviour checker has to be
extended to make the right calls.

Best,
Thomas


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the erlang-questions mailing list