Y
Hacker News
new
|
ask
|
show
|
jobs
by
haiku2077
381 days ago
Just tried this and it appears to be valid in the compiler, formatter and golangci-lint
1 comments
_whiteCaps_
381 days ago
https://en.wikipedia.org/wiki/Yoda_conditions
Works especially well in languages that can make assignments in if statements, e.g:
if foo = 42 { }
link
macintux
381 days ago
Thank you, I was unaware of this label. Quite descriptive.
link
Works especially well in languages that can make assignments in if statements, e.g:
if foo = 42 { }