[erlang-questions] Noob alert: tuple to record?

mats cronqvist masse@REDACTED
Fri Dec 5 08:01:18 CET 2008


Peter Sabaini <peter@REDACTED> writes:

> On the other hand I now begin to wonder if I should bother with
> records at all and instead use dicts or proplists for my data?

  records are useful if
a) the CPU cost of using dicts is too high (rarely true)
  or
b) you want to pattern match on the fields, e.g. like

   f(#foo{bla=ok}) -> ok.

  otherwise i recommend dicts.

  mats



More information about the erlang-questions mailing list