Access for Keywords are already O(n), just like access on lists would be. Tuples would probably be O(1).
On Monday, June 27, 2016 at 5:27:32 PM UTC+2, Louis Pop wrote: > > Hey > > I think adding the Access protocol to lists would imply that list > indexing is efficient. We should be careful to steer new users away > from techniques that are inefficient or not idiomatic. > > Cheers, > Louis > > On 27 June 2016 at 16:22, Filip Haglund <fille....@gmail.com <javascript:>> > wrote: > > Would it hurt to add it? > > > > On Sunday, June 26, 2016 at 6:16:19 PM UTC+2, Filip Haglund wrote: > >> > >> Why aren't lists and tuples implementing `Access`? > >> > >> {:a, :b, :c}[1] == :b > >> > >> > > -- > > 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 <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/elixir-lang-core/3042a07d-90c9-4c82-a3a4-579579d44a1a%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- 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/4a2311f4-f4ad-4a38-aa6f-3eeb2f4dd063%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.