News for hackers. Stuff that matters.
Re:Rails 5.0: Action Cable, API mode, and more by KallDrexx on Thursday June 30, 2016 @09:30PM (#12013251)
How are you planning on accessing it though?

If it's iterated over sequentially then a list works perfectly.

If it's random access then a map works.

Re:Rails 5.0: Action Cable, API mode, and more by cutler on Thursday June 30, 2016 @09:39PM (#12013294)
What if I want to push/pop it and also access it randomly by index? PHP gets a lot of stick for making arrays serve double purpose but the Elixir advocates of using maps for array purposes are basically arguing for the same thing, no?
Re:Rails 5.0: Action Cable, API mode, and more by di4na on Friday July 01, 2016 @04:07AM (#12014549)
Then you are not in functional programming place anymore, and you may want to use an imperative language.

I think it is John Hughes that said "The real question is not 'when should i use functional programming?' but 'when should i use imperative programming?' And the answer is 'When you need random access and complete control of your memory'"

Re:Rails 5.0: Action Cable, API mode, and more by kccqzy on Friday July 01, 2016 @03:53AM (#12014499)
Looks like you want a finger tree.