[erlang-questions] How erlang handle complicated data structure like C?

Rapsey <>
Sun Sep 18 14:40:59 CEST 2011


Your options are: propery lists and records. Records are faster, propery
lists are more flexible.


Sergej

On Sun, Sep 18, 2011 at 9:10 AM, Jovi Zhang <> wrote:

> Hi,
>    Is there any good way to handle complicated data structure like C in
> Erlang?
>
>    struct packet_t {
>        int a,
>        double b,
>        struct xx_t,
>        union c {int d, char e},
>        char f:1,
>        char g:3,
>        char h:5
>    }
>
>    Some protocol have complicated data structure like above, how to
> represent those structure in Erlang? and operate on each field freely
> like C?
>
> .jovi
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110918/e67fc6a8/attachment.html>


More information about the erlang-questions mailing list