[Proposal] Add Access.pop/3

40 views
Skip to first unread message

Felipe Stival

unread,
Apr 7, 2021, 1:41:10 AM4/7/21
to elixir-lang-core
We have Map.pop/2,3, Keyword.pop/2,3, so I think that, for coherency, we should also have default return support on Access.pop.

This would require no additional callbacks, just a minor addition in the Access.pop implementation.

I can send a PR if you agree.

José Valim

unread,
Apr 7, 2021, 4:02:18 AM4/7/21
to elixir-l...@googlegroups.com
Yes, please go ahead.

--
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/dd8328f8-f53a-4c96-a831-66dc1438bc15n%40googlegroups.com.

José Valim

unread,
Apr 7, 2021, 4:03:35 AM4/7/21
to elixir-l...@googlegroups.com
Actually, please don't go ahead. Since Access.pop/2 calls module.pop/2, adding a default would change the callbacks and, therefore, the current API. I would probably wait until there is a strong need for such feature.
Reply all
Reply to author
Forward
0 new messages