Re:Unpacking Elixir: Concurrency
by jerf on Friday August 25, 2023 @10:37AM
(#37262214)
Good 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.
[ Parent
| on HN ]
Yeah, the lack of user-defined types is definitely one of the biggest downsides of the BEAM.
Re:Unpacking Elixir: Concurrency
by throwawaymaths on Saturday August 26, 2023 @01:43AM
(#37270221)
Elixir 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.