Re: [elixir-core:11544] Support using brackets to access an index of a list

2023-09-22 Thread Wojtek Mach
I believe the best outcome would be for OTP to get a native vector type and then Elixir can support it, including the Access behaviour. So I would wait. it may never happen because the barrier to entry is so high but hey, OTP didn't use to have native maps either! piątek, 22 września 2023 o

Re: [elixir-core:11542] Support using brackets to access an index of a list

2023-09-22 Thread Paul Clegg
On Fri, Sep 22, 2023 at 11:54 AM Ben Wilson wrote: > The harm isn't for people who doing it intentionally, the harm is for > people who are doing it unintentionally. Index based array access is so > common in certain languages that it's one of the first thing newbies from > those languages will

Re: [elixir-core:11542] Support using brackets to access an index of a list

2023-09-22 Thread Ben Wilson
> Personally, I don't see the harm in supporting it. If someone's going to abuse it, they'll abuse Enum.at() The harm isn't for people who doing it intentionally, the harm is for people who are doing it unintentionally. Index based array access is so common in certain languages that it's one

Re: [elixir-core:11540] Support using brackets to access an index of a list

2023-09-22 Thread Paul Clegg
On Thu, Sep 21, 2023 at 7:19 PM 'Justin Wood' via elixir-lang-core < elixir-lang-core@googlegroups.com> wrote: > Languages that support it via square brackets: Rust, Ruby, Javascript, > Python, C, Julia. > > All of these languages (other than maybe Julia? I have not used it at > all.) are