3 ms·
Coming from F# and only dabbled in Elixir, I find the language unfortunately a bit confusing. For instance, the signature of a function only reveals the name an
by sinuhe69 3y ago
Coming from F# and only dabbled in Elixir, I find the language unfortunately a bit confusing. For instance, the signature of a function only reveals the name and number of the parameters but not type, so in a big library, it’s quite hard to recognize (mentally) what goes into what and one can only see one plugged the wrong parameters after one had ran and debugged the code. In strict-type language like F#, such issues would be detected right away during coding, thus it helps to reduce the time and effort immensely.
So my question is what are the main selling points of Elixir besides the Erlang environment?
- rapind 3y agoAs a language, I wouldn't call it an upgrade over F# (subjective). The main selling point is probably running on BEAM w/ ruby-ish syntax. BEAM is kind of a big deal IMO. I don't think it compares very well to F# types, but you can use typespecs: https://hexdocs.pm/elixir/1.15.7/typespecs.html https://hexdocs.pm/elixir/1.15.7/typespecs.html
- jswny 3y agoStatic typing for Elixir is in active development: https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradual-typing/ https://elixir-lang.org/blog/2023/09/20/strong-arrows-gradua... Yes, it is currently dynamic and yes, that means you won't get much int he way of type information from the language itself, it's not currently a statically typed language.
- deviprsd 3y agodynamic but still strongly typed
- shirvan 3y agoThere is a lot to like about Elixir itself including the nice syntax, which as mentioned in the article is inspired by Ruby and very easy to pickup. The BEAM/OTP is what really give Elixir the edge over other languages that I've used. In my experience they include many batteries that would be libraries in other languages, and most times those libraries add a ton of complexity, and sometimes a big learning curve; Async anything is a good example. I think once one works with Elixir for some time, and gets to learn these builtin tools and abstractions they understand the power of the ecosystem as a whole.
- thibaut_barrere 3y agoI've used .Net quite a bit (but F# only occasionally), I would say some selling points are: - the native integration of Machine Learning (including compiled to GPU) with e.g. https://www.youtube.com/watch?v=HK38-HIK6NA https://www.youtube.com/watch?v=HK38-HIK6NA, Axon, Nx, BumbleBee etc (there is a real push for that in the community) - the way LiveView works (although there is Blazor in .Net) - the fact that Elixir can be used in a large number of contexts (including embedded, see Nerves, or scripting but F# is usable for scripting too afaik) - overall, the BEAM and associated structures - package manager (Hex) is really nice (but .Net has nice tooling too) Just a couple of points from my own experience
- conradfr 3y agoThe lack of typehinting for function parameters is definitely the biggest productivity hit for me in Elixir. You can go by with typespecs, pattern matching and guards but that's kind of exhaustive and not really IDE / Intellisense friendly (at least with the community-led Jetbrains plugin).