Nvim

Nvim

Elixir vs Python

Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?

Most Liked

hauleth

hauleth

Python

Advantages

  • more lightweight VM
  • more broad distribution
  • “easier deployment”
  • broader area of usage (DevOps, Science Computations, scripting, etc.)
  • multiple popular VM implementations (CPython, PyPy, Jython, IronPython, etc.)
  • mutable types

Disadvantages

  • GIL in some implementations
  • distributed computation more complicated
  • mutable types
  • monkey patching (not that it is not possible in Erlang)

Erlang and Elixir

Advantages

  • very good distributed primitives
  • immutable types
  • simple syntax (in case of Erlang)
  • powerful syntax (in case of Elixir)
  • one VM can easily host different languages (Gleam, Elixir, Erlang, LFE, Joxa, Erlog, Luerl, etc.)
  • error handling
  • live updates

Disadvantages

  • immutability
  • without HiPE the performance is often worse than Python
  • less familiar syntax (in case of Erlang)
  • macros can be confusing (in case of Elixir)
  • single popular VM implementation
11
Post #6
peerreynders

peerreynders

https://trends.google.com/trends/explore?q=%2Fm%2F07sbkfb,%2Fm%2F02p97,%2Fm%2F05z1_,%2Fm%2F07657k,%2Fm%2F060kv

Python has caught up to Java in terms of popularity. I suspect this is largely due to the fact that typically development in Python is faster than in Java. The fact that it tends to be slower at run-time tends to be a non-issue in most cases.

Python is also easier to learn for non-programmers (while still remaining in the imperative paradigm which many feel is more “natural”) - so it tends to be the weapon of choice of domain experts having to automate stuff (which is what programming essentially is). PHP became popular to “quickly whip up a web site” - Python has a similar appeal to “quickly whip up a program/script”.

(Having said that I suspect that if the JavaScript ecosystem didn’t exist to sink a lot of “developer hate”, Python would be receiving it instead.)

Aside: mozilla.org: Bedrock is a Django Project

Python has positioned itself in the cloud space as a “productive” language - i.e. faster development times than with C, C++, C#, Go, Java, Kotlin etc. (while at the same time not being JavaScript). The tradeoff is that you may require more computational resources at runtime than for a compiled language. Truth is - if your service is profitable enough most businesses don’t care that they could lower the operational cost because they view the gain of efficiency as marginal compared to the perceived cost of (re)development.

For example look at this case:

Summary: Ignore Python at your own peril (try to be a Language Agnostic).

Phillipp

Phillipp

I don’t think it makes that much sense to compare them as their are very different and they are also used differently. But both can be used for web development, that is for sure.

Python is really strong in the ML/AI stuff, mainly because most of the tooling is written in Python. Probably to keep it very beginner friendly.

Where Next?

Popular in Discussions Top

Donovan
Hello everyone, I’m so glad to have discovered this awesome community. Thanks for creating it! This is my second post, and apologies for...
New
Jayshua
I recently came across the javascript library htmx. It reminded me a lot of liveview so I thought the community here might be interested....
New
blackode
Elixir Upgrading is so Simple in Ubuntu and It worked for me Ubuntu 16.04 git clone https://github.com/elixir-lang/elixir.git cd elixir...
New
ricklove
I was just introduced to Elixir and Phoenix. I was told about the 2 million websocket test that was done 2 years ago. From my research, t...
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
opsb
We’re considering our architecture from a viewpoint of scaling our traffic heavily over the next 6 months. Our current deployment is runn...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
sashaafm
Piggy backing a bit on @dvcrn topic BEAM optimization for functions with static return type?, I’ve been trying to understand in a deeper ...
New

Other popular topics Top

AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43806 214
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54250 245
New

We're in Beta

About us Mission Statement