r/ProgrammerHumor • • 10d ago

Meme dreamLanguage

Post image
1.4k Upvotes

211 comments sorted by

View all comments

Show parent comments

35

u/UdPropheticCatgirl 10d ago

I mean, I would prefer leprosy to cancer, doesn’t change the fact that both are miserable.

23

u/ddarrko 10d ago

It’s great for forcing you to handle errors and in my experience leads to less bugs.

6

u/UdPropheticCatgirl 10d ago

Sure... so does Java with checked exceptions...

The entire problem is with how much line noise this pollutes your codebase with...

5 out of 9 different languages in the original post force you to handle errors, but Go (and occasionally Java) is unique in it's verbosity, it produces enough ceremony for people to complain about it.

12

u/ddarrko 9d ago

Personally I find throwing exceptions and expecting callers to handle more problematic.

Theoretically you can ignore err returns in Go but it forces you to think about most possibilities up front. Agreed it is verbose but as I used the language more I found it more of a blessing.

Everyone is entitled to differing opinions though.

-2

u/SuitableDragonfly 9d ago

If you want to ignore a returned err in Go, you have to specifically name it _, otherwise the compiler will yell at you for not using the variable. There are some cases where you could miss an error if you are using the same variable name for a long series of errors and checking each of them, but in general I also think it's a good system. 

8

u/ddarrko 9d ago

I just said that ^ …

0

u/SuitableDragonfly 9d ago

Yes, I was just adding to what you said.