Manipulating Data Structures

Eberhard Lutz <>
Fri Jun 2 12:35:28 CEST 2000


Hello together,

I hope you forgive this newbie question from a C++, Perl, etc.
geek who is willing to convert to Erlang in order to set up a
fault-tolerant and distributed system without having to write
base classes for the next 5 years ....

The question is about data structures and the copy overhead
of their modification.
Let's say you have in Perl something like
        $record = {
            "language" => 'Java',
            "status" => 'overhyped',
            "usage" => 'with care',
            "samples" => [ $prog1, $prog2 ]     %% each $progX is a 200kByte data chunk
       }
Now, how do I most effeciently do something like
        $record->{status} = "dead".

So to put it simple: how do I update large data structures without
running into useless copy operations of the whole structure.

I assume that Erlang is handling these matters as elegantly as it
handles the rest of the world, but being suspicious by nature it would
make me sleep better if I get tons of replies like 'Hey silly newbie, this is simple ....'.

Thanks in advance ...

With best regards

Eberhard Lutz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20000602/26cbd707/attachment.html>


More information about the erlang-questions mailing list