Erlang proplists support in Access

33 views
Skip to first unread message

OvermindDL1

unread,
Oct 12, 2017, 10:36:21 AM10/12/17
to elixir-lang-core
I took a quick look in Access and I'm not seeing a protocol or anything that can be done to support erlang property lists in Access without wrapping them in a struct (which would of course add in a lot more code than would otherwise be needed to access them straight, but what about the cases where any of map/kwlist/proplist can be accessed).  How can an end-user add support for erlang property lists in Access?

José Valim

unread,
Oct 12, 2017, 10:38:15 AM10/12/17
to elixir-l...@googlegroups.com
Can't you define your own Access.prop(:foo) though?



José Valim
Founder and 
Director of R&D

On Thu, Oct 12, 2017 at 4:36 PM, OvermindDL1 <overm...@gmail.com> wrote:
I took a quick look in Access and I'm not seeing a protocol or anything that can be done to support erlang property lists in Access without wrapping them in a struct (which would of course add in a lot more code than would otherwise be needed to access them straight, but what about the cases where any of map/kwlist/proplist can be accessed).  How can an end-user add support for erlang property lists in Access?

--
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-core+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/3f45b066-4b2b-406b-b723-c1e224933127%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

OvermindDL1

unread,
Oct 12, 2017, 11:06:20 AM10/12/17
to elixir-lang-core
Yep yep, and I do already have such a function that returns such a function, I'm more curious in having something like `some_prop_list[:a}` work transparently though so I can thread options into and out of erlang libraries regardless of if proplist/map/kwlist?


On Thursday, October 12, 2017 at 8:38:15 AM UTC-6, José Valim wrote:
Can't you define your own Access.prop(:foo) though?



José Valim
Founder and 
Director of R&D

On Thu, Oct 12, 2017 at 4:36 PM, OvermindDL1 <overm...@gmail.com> wrote:
I took a quick look in Access and I'm not seeing a protocol or anything that can be done to support erlang property lists in Access without wrapping them in a struct (which would of course add in a lot more code than would otherwise be needed to access them straight, but what about the cases where any of map/kwlist/proplist can be accessed).  How can an end-user add support for erlang property lists in Access?

--
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.
Reply all
Reply to author
Forward
0 new messages