News for hackers. Stuff that matters.
Re:Rails 5.0: Action Cable, API mode, and more by rdtsc on Thursday June 30, 2016 @09:05PM (#12013145)
Why do you want an array? You mean you want a memory area with adjacent cells layed out, to talk to C perhaps? Perhaps might want a list, a binary, or a sorted set, a tuple, a map and so on. You have to tell a bit more about your use case.

I used Erlang for many years, and in the last one full time. Not one time have I needed an "array". It seems you picked one odd feature no-one uses and are upset about it, I thik it is just a small misunderstand, if you share a bit more about what you are trying to do, you'll get more help.

> I just find this disappointing

Did you explain your use case to them. If you just said "I need an array" I see their response as perfectly rational. And from what I've seen, that is probably the friendliest and most approachable community, especially for newcomers.

Re:Rails 5.0: Action Cable, API mode, and more by cutler on Thursday June 30, 2016 @09:21PM (#12013216)
I would need an array for processing any large data set as an indexed collection. Why is that considered an "odd feature no-one uses" when it's a fundamental data type in most mainstream languages?
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.