Is Elixir more understandable and easy to learn than Python?

I mean, there’s an argument to made to not learn Python at all and I think you may have just made it :upside_down_face:

2 Likes

Thats the main reason we are all on this forum :smiley: You have to get through python or to fully appreciate elixir.

1 Like

Didn’t say anyone can’t learn it, I said the path to being a dev in Elixir seems to start at a senior level. It’s not really an ‘entry’ level language if you want to start a career in programming. You’re welcome to send me a load of junior level job advertisements if you disagree.

2 Likes

It’s not misguided at all.

Comparing one of the top 3 in demand languages with something that doesn’t even make the top 10+ and assuming they have similar resources levels is what’s misguided. It’s not hard to learn the basic syntax of any language, but learning practical applications in Elixir as a person new to coding is significantly more difficult than learning one of the more popular languages.

I don’t know JQuery, but if I need to do JQuery I’m 99% sure I can do it because it’s always just a google away. Elixir doesn’t have that luxury. I sometimes google how to do things in Ruby because I know it’s more likely to get me a result than how to do it in Elixir. Learning resources are an important part of learning, and Elixir has far fewer learning resources than Python so it is not as easy to learn.

If you have a dedicated teacher its a whole different story though, but as a random on the internet they aren’t the same difficulty.

Python is a toy language, Elixir isn’t

1 Like

I hear that your experience learning Elixir hasn’t been as easy as with other languages and I share your frustration that there are very few junior/mid level jobs. That doesn’t mean everyone else has a hard time learning it or finding a job. People click with different paradigms and learn differently. Personally, I came from Python and .NET because I could not understand how to build an application with their concurrency models. Millions of other people manage to do so and that’s great for them. Also, I was pretty inexperienced in programming at the time. I’m certainly not the only person with this background.

Sure, there are less junior Elixir jobs around, but that was not what Ann was asking about. One could assume from their post that they’re not even interested in getting a job.

From a quick glance at the jobs board, a lot of Senior positions require 3-4 years of software engineering experience overall.

If that is what passes for senior, then perhaps one shouldn’t be too intimidated by the title. Don’t let it stop you from applying.

7 Likes

Well, sure, if you’re looking for a dedicated teacher that’s a different story.

What kind of things are you googling in Ruby that you can’t find in Elixir?? Other than that Ruby uses a lot of “functional methods” they aren’t exactly alike (well, and the look of the syntax, of course).

Ugh, I use python on a weekly basis and I don’t understand why it does something so abominable.

2 Likes

I mentioned having a dedicated teacher as an example of where the languages would be equivalent in difficulty to learn because it makes the resource levels of the different languages available online less significant. Remember the topic of the discussion is which language is easier to learn. With a teacher any language is equivalent, but with pure internet and book resources Python is easier than Elixir by a long shot.

1 Like

I respectfully disagree with this.

Python may have more learning resources, but that doesn’t necessarily make it easier to learn. C++ has a lot of learning resources and it’s hard as shit. Same with Rust… :stuck_out_tongue:

Further, I find Elixir’s official documentation 10x easier to read and understand than Python’s (or Ruby’s).

As someone else pointed out, Elixir follows the principle of least surprise much better than Python, thus making it easier to learn.

As far as the language itself, I find Elixir to be extremely simply. Not only simple, but very “small.”

But if you’re talking about frameworks (OTP, Phoenix, Absinthe, Nerves, various libraries etc etc), that’s a different story. BUT… I find most of them to be so much better documented than their counterparts in other languages that it makes them “easy” to learn.

Edit…

Also, I prefer when I ask an Elixir question that the top Google hit is official documentation that answers my question perfectly…

Rather than 100 blog posts trying to answer the question well.

2 Likes

Well it’s pretty safe to assume someone learning the language is going to be learning it in order to apply it somewhere, which means its pretty safe to assume they are going to be diving in to the framework. I’ve said before learning the basic syntax in any language is easy, learning practical application is where it gets tricky because you need to know the system it exists within as well as the language.

Also the hexdocs are like a car manual, they may be written very well from a technical standpoint but expecting someone to read through them to understand how a car works vs someone teaching them how a car works are completely different things. Some people are good at reading manuals, but most people learn from doing or being shown things.

Also, I’d rather have 100 examples and 80 of them be wrong than no examples at all as at least it’s something to work from if I am totally lost.

1 Like

The @ityonemo seems like a peculiar example because

  • the list manipulating methods in Python are not immediately intuitive IMHO. Also, I think it is more pythonic to default to None, instead of [ ] ?

  • the term “easier” implies some kind of comparison and there’s no corresponding snippet in Elixir.

As someone familiar with Python, but new to Elixir, I would like to see the comparison.

1 Like

Let’s compare to an easier to follow example. It’s the same crazyness. Bakground: Python initializes default arguments when the module is loaded, not when the function is run. With mutable default arguments this is the consequence:

>>> def f(l=[]):
...     l.append('foo')
...     return(l)
... 
>>> f()
['foo']
>>> f()
['foo', 'foo']

Elixir’s datastructures are immutable, so this is what happens:

defmodule Test do
  def f(l \\ []) do
    l ++ ["foo"]
  end
end

Test.f() |> dbg
Test.f() |> dbg
Test.f() #=> ["foo"]
Test.f() #=> ["foo"]

As expected. No surprises. So Elixir can’t mutate, which makes some things harder, but in the end the code is easier to understand and to maintain.

4 Likes

Now that is pretty disgusting.

It is interesting that python was designed with simplicity in mind: an interpreter to avoid compiled languages complexity at the cost of performance, simple but not scalable syntax for new people that have never developed, batteries included for basic libraries that someone might need.

Somewhere along the way it lost it’s way, it would be nice to hear the story from someone who knows what truly happened.

In Python, mutable default arguments are possible, but discouraged.

In my experience: hard yes. I’ve been doing Python for two months and appreciated it a lot for how clean and simple it looks and feels compared to other languages. But learning Elixir was a lot more easy and fast (I switched over two weeks ago), and I immediately started writing much better code with much less hassle.
I think just everything about Elixir is an order of magnitude or two bettern than Python, except for the lack of libraries (specifically, I couldn’t find a plotting library that would be as customizable as Plotly, maybe VegaLite, haven’t looked into it that much yet tbh).

1 Like

All due respect @Ann you’re asking for a definite answer to a broad and vague question. And you’re asking whether you should learn python or elixir on an elixir forum. I think you should learn elixir but I’m (admittedly) sort of prejudiced.

1 Like