variables passed as parameters

orbitz@REDACTED orbitz@REDACTED
Fri May 12 17:45:04 CEST 2006


You can't update a list remember?  You can only create a new list.   
Objects are immutable in Erlang, it is single assignment.

On May 12, 2006, at 9:40 AM, Danie Schutte wrote:

> Just a quick question,
>
> when a list / gb_tree is passed as a parameter, is a full memcopy  
> of the data
> done to the new function?
>
> The reason for my question:  We would like to a have a data set  
> passed on
> through various modules, and each module may / may not update this  
> data..
>
> We are trying to figure out if it would be faster to create a  
> single module
> that manages the data in a "memory space" (like a gen_server state  
> variable
> or an ets table) or wether it would not really matter in terms of  
> speed - and
> the only factor to watch out for would be memory?
>
> Thanks
> Daniel
>
>




More information about the erlang-questions mailing list