[erlang-questions] [ANN] Elixir v0.5.0 released
Fri May 25 20:12:44 CEST 2012
Actually, a better answer to this question would be: it should be easy for
you to create a macro that will generate the appropriate handle_call or
handle_cast functions based on a record. Here is a spike (I haven't tested
it, but you will have an idea):
Feel free to ping me by e-mail if you want to go further into this. :)
Founder and Lead Developer
On Fri, May 25, 2012 at 6:19 PM, José Valim <> wrote:
> Is it possible to use elixir to emulate objects on top of gen_server
>> with their "instance variables" which are just fields of record?
> Elixir does not have the concept of objects. So you have to do the same as
> Erlang. You need to create a record and access/manipulate the records
> fields. There is a difference that Elixir records are not a preprocessor
> feature, so access/manipulation is less verbose.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions