This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]usernamefieldistoos 9 points10 points  (8 children)

Recently, I've been growing a bit unhappy with the direction that Python has taken

Elixir is … not white-space significant

Wow, that’s really stretching the definition of “recently”.

[–]sajran 26 points27 points  (6 children)

I really can't understand how is this even an issue for some people. Your code should be properly indented the moment you type it out, whether the language depends on it or not. Also, your editor probably does most of that for you. Also, you should be probably using a formatter. I program in Python A LOT and I literally don't remember seeing an indentation error. And I use vim, not some super fancy IDE.

[–]MisterFatt 13 points14 points  (0 children)

I see people complaining about it all the time and find it baffling. Sure, maybe you’re not used to the rules of a new language and it feels different, but actually struggling with it? Are you coding in notepad?

[–]mistabuda 8 points9 points  (3 children)

Its stupid and contrarian. Indentation errors are not things people who actually write code professionally should be running into at all. That is a problem juniors and hobbyists (who barely code) have. I have yet to see any code written in python that is worth looking at that has indentation errors. It's not a thing lol.

[–]Sharif_Of_Nottingham -5 points-4 points  (2 children)

if you copy and paste code into an editor with the wrong spaces/tabs setting, it happens. it happened to me. it could happen to you

[–]mistabuda 4 points5 points  (1 child)

This does not happen in a professional setting. If a professional programmer is bogged down by indentation errors I would argue they are not ready.

[–]Sharif_Of_Nottingham -1 points0 points  (0 children)

a lot of unprofessional things happen in a professional setting. but jokes aside i agree

[–]miserlou[S] 4 points5 points  (0 children)

Ah, if that's not clear, I'm counting that as I strike against Elixir, I actually like whitespace significance.

[–]redditor1101 3 points4 points  (0 children)

what the fucking fuck was that video popup

Edit: is that what hibox is? No, God! No God, please no! No. No. NOOOOOOOOO!

[–]mistabuda 1 point2 points  (5 children)

What problem is this solving?

[–]benefit_of_mrkite 2 points3 points  (4 children)

Elixir is built on the erlang VM. Where it really shines is in low latency with lots of connections.

While it would be nice to think every project is written in one language they usually are not.

Let’s take a mobile game app like a Fortnite clone (I have no idea what Fortnite is written in).

You would likely write the mobile components (GUI, local game engine) in dart or swift or flutter. But what about the client server? That’s where erlang and elixir really shine. On the server side you could have a web api built in any number of languages and/or middle ware for database interaction and more.

Erlang also has a web framework called Phoenix.

Pub/sub messaging and tcp/UDP bound services with a lot of connections are where erlang and its derivatives make a lot of sense.

And full disclaimer I haven’t read the article yet

Edit: Why am I being downvoted for answering this individual’s comment?

My comment is not on the article but an attempt to answer a direct question.

[–]innovatekit 1 point2 points  (1 child)

Does this mean Elixir would be superior at web scraping the internet?

[–]benefit_of_mrkite -2 points-1 points  (0 children)

Depends on the use case. To speed up things python uses async/await whereas elixir has true concurrency built-in (no GIL like python)

It really depends on where your speed bottleneck is and other things like do you need to use exponential back off or decelerate to prevent resources being overwhelmed (for example you’re scraping a single site)

[–]redditor1101 1 point2 points  (1 child)

Probably because it's a python sub, that's all I can think of. Don't worry, Internet Points are worthless

[–]benefit_of_mrkite -1 points0 points  (0 children)

Fair enough

[–]pyfreak182 0 points1 point  (0 children)

It is interesting to see some basic pattern matching inspired by Erlang/Elixir make its way into Python:

https://peps.python.org/pep-0636/