[erlang-questions] Erlang record accessors (set/get)

Loïc Hoguin essen@REDACTED
Wed Aug 15 03:10:54 CEST 2012


Val = element(#myrec.fieldname, Rec).
Rec2 = setelement(#myrec.fieldname, Rec, NewVal).

Or something approximating that.

On 08/15/2012 03:04 AM, Zabrane Mickael wrote:
> Hi guys,
>
> We want to provide a simple API to one of our customers not very
> familiar with Erlang.
> This API involves records manipulations (set/get operations) and you
> know what I mean.
>
> Before re-writing the wheel, I'd like to know is someone already used
> "recbird" before:
> http://blogtrader.net/blog/recbird_an_erlang_dynamic_record
>
> Any use case? Is it stable? Better alternatives?
> Feedbacks welcome!
>
> Regards,
> Zabrane
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>


-- 
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu



More information about the erlang-questions mailing list