NullVoxPopuli @nullvoxpopuli.com 路 Mar 1

AI seems to not know about the nullish operators. Which means humans don't know about the assignment operators 馃槺 Lemme save you all so much typing:

29 likes 5 replies

?

Replies

Karl 路 Mar 1

It takes more time to read & understand this code than to write it, therefore it's discouraged in many linter rules. I am personally not a fan of it.

Jan Aagaard 路 Mar 1

It used to be that you would always see foo++ to increment. But that foreach has replaced most of the for loops, it is much more rare that you need to increment a value. And therefore foo = foo + 1 is now much more common than it is used to be. More verbose but also less clever.

Larry鈥檚 Tickle Party 路 Mar 1

If I had a desk with 3 ft of papers on top of it, I would sweep it all off so I could jot this shit down.

NullVoxPopuli 路 Mar 1

See also: ??= &&= **= ^= |= &= *= %= -= >>>= >>= <<<= <<= most common: +=

Justin Fagnani 路 Mar 1

||= is the wrong operator for these though. Should be ??=