News for hackers. Stuff that matters.
Re:Cursed Elixir by rkangel on Monday October 19, 2020 @05:18AM (#24824613)
> with a for loop you could literally mutate anything in scope

That depends on the language. In Elixir for instance, you can't mutate anything. Elixir does have 'for comprehensions', and there are things that you can express very clearly in what is effectively a for loop that would be much harder to read in a chain of iterators.

Re:Cursed Elixir by dnautics on Monday October 19, 2020 @11:12AM (#24827074)
That's not strictly true. You could use the process dictionary to keep hidden mutable state in the for loop. Don't do this.