4 ms·
Note that Erlang has maps since OTP 17, which I believe are implemented more efficiently than dicts.
by jolux 3y ago
Note that Erlang has maps since OTP 17, which I believe are implemented more efficiently than dicts.
- jerf 3y agoGood point, though I think my point about user types still holds. It is very difficult to create any efficient user types of your own with the primitives Beam provides.
- jolux 3y agoYeah, the lack of user-defined types is definitely one of the biggest downsides of the BEAM.
- throwawaymaths 3y agoElixir builds types out of maps (using the struct) and you can build multiple dispatch operations over types using Protocol. If you want to pretty print your user types, you can implement the Inspect protocol.