3 points

Would you rather have semicolons or significant newlines?

permalink
report
reply
5 points

Semicolons. Statement’s can be written in multiple lines such as rust io::stdin(&mut foo) .unwrap(). Idk if it would work if the newlines were significant. Also when I paste something, it could be ready hard for the formatter to format it.

permalink
report
parent
reply
2 points
*

You can replace return foo with just foo.

permalink
report
reply
4 points

Not here, because it’s being used as a function argument.

permalink
report
parent
reply
3 points

Oh wow. I hate this lol

permalink
report
parent
reply
2 points

Well you have a variable foo being mutated. Maybe that’s what they’re for?

permalink
report
reply
1 point
Deleted by creator
permalink
report
reply
5 points

After programming in Go for nearly a decade, the idea of going back to needing semicolons brings me pain. Rust seems cool, but semicolons 🤢

permalink
report
reply
8 points

As you can see, rust allows you to not put semicolons at the end of code blocks. The presence of semicolons is not a language killer. It’s a very hard language, but its worth it.

permalink
report
parent
reply
2 points

The presence of semicolons is not a language killer.

I’m not saying it is. But every time I have to work in a language that requires semicolons I’m constantly forgetting them and constantly reminded of how nice it is to not have to care in Go.

permalink
report
parent
reply
4 points

I agree. Semicolons are a small “tradeoff” (personally not for me) for such a great language.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.3K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments