Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Why does Clojure need them or Ruby or Python (lists)?

So you want a list it seems

   > l=[1,2,3]
   > [h | t] = l
       [1, 2, 3]
   > h
       1
   > t
       [2, 3]
> If I want to process data as a large indexed array Elixir isn't going to help me

But neither will Python. You'd want a large indexed array you probably want numpy.

See now you are revealing a bit more about your usecase that's helpful. So you have large amount of data and want to query it and process it. In that case you might want to check out ETS. The nice benefit, you have have cool matching or query list comprehensions of it. Can also access it concurrently from multiple processes:

http://elixir-lang.org/getting-started/mix-otp/ets.html

This is the Erlang side of it:

http://learnyousomeerlang.com/ets

> but the question here is whether it is deficient in other areas, making it too much of a niche language.

Of course it is deficient. C is deficient. Java, C++ is they all. Every language is deficient in some way. I haven't found a Perfect one yet. Still looking... Maybe Rust, who knows, still struggling to learn it.



>But neither will Python. You'd want a large indexed array you probably want numpy.

Python comes with array.array¹ natively.

¹ https://docs.python.org/3/library/array.html#array.array


Original poster, specifically mentioned lists in Python, i.e. implying they wanted something equivalent to that. (Why does Clojure need them or Ruby or Python (lists)).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: