> Maybe we could consider only introduce take! in this case, given the fact we already have pop! without having delete!.
In my mind, pop! is fetch!+delete, so I think it is fine to not have delete!. But take/drop were always closely related. On Mon, Oct 25, 2021 at 4:31 PM Caio Câmara <caio.dscam...@gmail.com> wrote: > https://github.com/whatyouhide/short_maps > > I think we can get some inspiration from this. > > Em seg., 25 de out. de 2021 09:58, José Valim <jose.va...@dashbit.co> > escreveu: > >> It doesn't quite apply to `Map.take/2` because the field may not be there >> anyway, so you can't easily pattern match, you always need a case. >> >> I also see why we would add "delete!" but at the same time, "delete!" >> does not have much purpose. The result won't have said field anyway. >> >> Now I am thinking it may be better to not add `Map.take!/2`. It is not >> complicated to implement it yourself and given the possible confusion with >> pattern matching and that it may require both drop! and delete!, it is >> probably not worth it. So for now I would like to postpone adding this >> functionality. Sorry. >> >> -- >> 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/CAGnRm4LZsHUBFkBH19w4-UNgApYuBAQj4K4vrhAu43NQz47%3D5g%40mail.gmail.com >> <https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LZsHUBFkBH19w4-UNgApYuBAQj4K4vrhAu43NQz47%3D5g%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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/CAK5L3ppWMPOx53p%2Bxp8%3DZwsJnFrWysVaSBxxAH%2BeXnMZzFX%3DDg%40mail.gmail.com > <https://groups.google.com/d/msgid/elixir-lang-core/CAK5L3ppWMPOx53p%2Bxp8%3DZwsJnFrWysVaSBxxAH%2BeXnMZzFX%3DDg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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/CAGnRm4JL0cT3juRtthbs%3DvUQr_KPGzBY9iEyvS%2B%3DSrY6AwPbYg%40mail.gmail.com.