Matching elements of records
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).
"Vlad Dumitrescu" <> writes:
> From: "Javier París Fernández" <>
> > 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
> Matching [Y, Z] = X splits an existing entity into its components.
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions