Coping with records?

Tim Bates tim@REDACTED
Tue Nov 1 12:38:07 CET 2005

Hi folks,
I'm getting into the nitty-gritty of my first largeish Erlang system, 
and I have a few questions about how to structure things going forward, 
particularly as my system expands to include multiple nodes and live 
code changes.

Records seem fine for local or short-lived structures such as process 
state, but for potentially long-lived pieces of data in a long-running 
system that may see many code changes, they cause problems if you 
redefine them and then get an old one out of a database or somewhere 
else. Since Joe's "structs" idea seems to have died in 2003, what are 
people doing in their systems to address these problems?

The only idea I have is to do all my operations on record-like data 
structures through a function call interface, and embed a version number 
in the record so that the functions know exactly which data structure 
they are using. This seems a bit unwieldy though. Any ideas?


Tim Bates

More information about the erlang-questions mailing list