--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/9faf9f62-72ad-41bd-9179-ee25d155cf65n%40googlegroups.com.
There are two userspace approaches that see some usage to deal with types like `:array`:
- There are some alternative/more powerful (but therefore also
less portable/general/widespread) alternative 'protocol'
implementations,
such as `protocol_ex`. These will help if you have new
protocols, but will not help to integrate new types with
preexisting 'normal' protocols.
- A couple of libraries out there that wrap `:array` with a
struct and implement common protocols for these (as well as, in
the case of arrays, possibly the Access behaviour).
For something like `:array`, this should not be significantly
slower even though an extra wrapper is used.
This technique integrates well with preexisting protocols, but
does require you to use the wrapped types in your own code rather
than e.g. `:array` directly.
~Marten/Qqwy
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BvO5r9wUe6M3HE%3DOLW%2Bhtu3cjiexD_bvcuhMdDbnYTtQ%40mail.gmail.com.