Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
That's gonna be a quick rant about Golang.
Anyone else here frustrated by the fact that you can inline assignment in the if statement, but can't inline the if-else itself?
You can do:
if thing := hey.getThatThing(); thing == theThing {
return 'this'
} else {
return 'that'
}
But can't do:
return 'this' if hey.getTheThing() == theThing else 'that'
Or is it just me using too much Python everyday and connecting that with Go in free time?
rant
if statement
go
golang
language comparison
gopher
python
if else