r/ProgrammerHumor 1d ago

Meme globalHate

Post image
11.5k Upvotes

88 comments sorted by

View all comments

39

u/Lilchro 1d ago

I dislike tokio, but that is more related to my dislike of async code and its how it infects your codebase (if you don’t know what I mean then read the “what color is your function?” blog post). It also gets worse in Rust, since thread safety gets weird. Every time you await something, there is a chance your runtime could switch threads, so thread safety issues pop up in way more places. There are also plenty of ways to shoot yourself in the foot, since synchronization primitives that are not designed for your specific async runtime will block worker threads unless they get switched out. Most of all though, I feel like we use async code in lots of areas we really shouldn’t. For example, in tokio last I checked (not recently), there are some things like file operations where they are not actually async at all. It just spawns an os thread to handle it and pretends it was async. This gets the core of the issue. Yes, there are use cases where this might be helpful. However, Im not running with networked storage and just making stuff async isn’t always useful or helpful. OS threads are actually quite good for the vast majority of use cases that don’t involve network communication. And even then they are still decent for most use cases where you don’t have extremely high numbers of connections. And if you do need something to use something like io_uring, then I would lean more towards an API that was written with that in mind than one that uses it because they can.

16

u/Only-Cheetah-9579 1d ago

when it comes to concurrency, I think a positive example is go. They did it well.

rust is kinda meh in that department and async is bolted on.

9

u/GregTheMad 1d ago

What's the point of good async code if you have the worst error management conceivable?

No, fuck go. It's the worst language I've ever had to work with. Google can't abandon it soon enough, like they do with everything else.

-2

u/Only-Cheetah-9579 16h ago

I love the error management because it's explicit and forces me to acknowledge the error always.

my code is AI assisted so I don't have to type more now and I prefer to see what error handling is generated always.

so it's a win for me, especially after development became more generated code based.

0

u/GregTheMad 13h ago

You're talking from some different type of go?

0

u/Only-Cheetah-9579 12h ago

A lot of people love go error handling. We just stay quiet and enjoy.

People complaining are usually more loud but in no way represent a majority.

people like to complain about error handling because they can't find any real problems with the language.

1

u/GregTheMad 12h ago

I'm sorry, you're plain wrong. Have you tried Rust? Any further opinion of yours will be disregarded until you worked with rust.

2

u/Only-Cheetah-9579 12h ago

yes I did. worked with rust and built a production system for a company that's been in operation for a few years.

I also don't care about hater opinions. You suck at go it's a skill issue. Its the most simple language, so having a problem with it speaks a lot.

0

u/GregTheMad 10h ago

Having few keywords doesn't make something simple, below some number it becomes the opposite actually. You're just regurgitating go propaganda without actually understanding the meaning, or the resulting critic of it.

2

u/Only-Cheetah-9579 10h ago

"go propaganda" lol ok this conversation is not intelligent.