News for hackers. Stuff that matters.
Re:Unpacking Elixir: Concurrency by throwawaymaths on Saturday August 26, 2023 @01:45AM (#37270226)
That's not answering the question. I've written many thousands of lines of elixir and never used index based access.
Re:Unpacking Elixir: Concurrency by cutler on Saturday August 26, 2023 @06:42AM (#37271546)
Good for you but why do all mainstream languages, including Clojure, have them?
Re:Unpacking Elixir: Concurrency by throwawaymaths on Saturday August 26, 2023 @11:23PM (#37279154)
Because they're built on mutable datatypes. Elixir (and Erlang, and some flavors of lisp) are not. Instead of fudging it to make it syntactically "look like" an array access, elixir makes you flip through the list to understand the cost of what you're doing.

Even clojure's is a cheat.

Re:Unpacking Elixir: Concurrency by cutler on Tuesday August 29, 2023 @01:43PM (#37311313)
Then maybe that's a shortcoming of absolute immutability.