Record selectors (again)

Bjorn Gustavsson <>
Thu Jun 24 13:27:29 CEST 2004

Jay Nelson <> writes:

> Using the current compiler, the following
> shorthand way provides the same safety (and is the way I
> code all my record arguments now):
> unsafely_access_a(#rec{a=Value}) ->
>     Value.

That is my prefered way of writing record expressions;
I almost never use the R#rec.field notation.

But many (most?) Erlang programmers use the R#rec.field notation,
so the compiler should ideally give them too as early fault
detection as possible.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list