Matching elements of records

Bjorn Gustavsson bjorn@REDACTED
Tue Nov 2 10:25:27 CET 2004


Yes, that was exactly the distinction I had in mind.

In the assignment case, more heap space will be allocated.

In the matching case, no heap space will be allocated
(except when matching binaries, but they are strange creatures).

/Björn

"Vlad Dumitrescu" <vlad_dumitrescu@REDACTED> writes:

> From: "Javier París Fernández" <paris@REDACTED>
> > Just curious, but what is in your opinion the difference between
> > assignment and matching in a functional language? I see none.
> 
> In my view, assignment X = [Y, Z] is creating a new entity from several existing
> ones.
> Matching [Y, Z] = X splits an existing entity into its components.
> 
> regards,
> /Vlad
> 

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list