this post was submitted on 25 Jan 2024
677 points (97.6% liked)

Programmer Humor

19706 readers
146 users here now

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

founded 1 year ago
MODERATORS
677
=== (programming.dev)
submitted 10 months ago by JPDev to c/programmer_humor
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 10 months ago (1 children)

Try changing to const === variable. That’s most likely what’s it doing to minimize the risk of accidental assignment.

[–] [email protected] 3 points 10 months ago (1 children)

Wut? This is an automated optimizer. It is not worried about accidental assignment.

[–] [email protected] 1 points 10 months ago (1 children)

I agree it shouldn’t. But I’ve seen linters that automatically change it since they seem to be forcing practical conventions sometimes.

[–] [email protected] 3 points 10 months ago (1 children)

Linters and minifers are completely different tools.

[–] [email protected] 3 points 10 months ago

Good point. That’s what I get for shooting from the hip.

Thanks!