I have not thought about this in a while. I don't immediately see those new functions as something I'd use. They push extra burden on the client programmer to know all the corner cases and protect from them. I always envisioned `get_in` as something like searching an html document via a css selector. It never raises, even if the document is empty. It either finds matching nodes or it does not.
I learned from earlier in this thread that is not the mental model the core team has for `get_in`. I ended up creating a small library to meet my needs (https://hex.pm/packages/path_express). -Greg > On Jul 6, 2020, at 5:54 AM, José Valim <jose.va...@gmail.com> wrote: > > Resurrecting this old-thread. Greg, what if we had a Access.if_nil([]) that > would put an empty list if there is a nil value? We could also have > Access.on_nil(:error), which effectively halts. > > A bit verbose but it will give you control exactly what to do and when, > without coupling to the current functions. > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/36580c49-f276-4512-a2aa-da7ecb7daf60o%40googlegroups.com. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/A60CD174-3CEF-43A3-9C7C-96BD0F631952%40gmail.com.