[erlang-questions] Add a new data structure to erlang VM.

Robert Virding <>
Mon Jul 11 03:21:00 CEST 2016


It feels a bit off adding a mutable data structure to erlang where
everything else by design is immutable.

Robert


On 9 July 2016 at 19:54, Constantin Kulikov <> wrote:

> If I want to add a new datastructure to erlang(my local fork of the
> erlang-otp from github), what should I do? Yes, I mean a C-level module
> realization.
>
> Let's say I want to add a double linked list(just for simplicity) module
> with an interface like that:
> dlist:new() -> ?some king of reference to a list?
> dlist:push(item) -> ?reference to a list?
> dlist:pop() -> {item, ?reference to a list?}
> etc...
>
> Is it possible at all? Has anyone ever tried to do something like this?
> What definitions to what files should I add? How must I allocate my data
> structure? How must I reference items in it?
> Can someone point me to source locations where erlang's list/ets
> table/tuple operations(creating a new, storing a reference to objects)
> defined?
>
>
> _______________________________________________
> 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/20160711/35ecc69f/attachment.html>


More information about the erlang-questions mailing list