Ulf Wiger etxuwig@REDACTED
Tue Dec 4 13:24:43 CET 2001

On Tue, 4 Dec 2001, Hakan Stenholm wrote:

>Actualy I'm quite aware of this, there is a lot of code that
>relies on records being tuples: lists:keysearch, ets tables,
>code change code in the AXD301 ... so I can't say that I expect
>the implementation to change.

Of course, functions like lists:keysearch() and ets:insert() et
al would have to support operations on record types.
For example:

  lists:keysearch(Key, #myRec.key, List)

should work as expected on true record types.

Code change functions should be possible to ignore, since it's
difficult to write a generic code_change function that works
independently of what's changed in the code. IOW, one has to
write a specific code_change function for each upgrade.

There _shouldn't_ (tm) be that much code that breaks the record
abstraction. One problem is that it's difficult to find those
instances that do... One way is of course to run the system until
it breaks, but that approach leaves something to be desired.

Personally, I'm in favour of making records a real data type,
but if pressed, I'll deny I ever said that. (:

Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks

More information about the erlang-questions mailing list