I think one of the things we don't appreciate enough about Rust is how it goes out of its way to say "hey! looks like you're trying to use a C idiom. Here's how we say that in our language." Anyway we spell `-1` as `!0`, which is something we may want to tell C programmers.
-
Show this thread
-
Replying to @myrrlyn
!0 is the worst way to spell it imo. Spell it u32::MAX
2 replies 0 retweets 6 likes -
-
Replying to @myrrlyn
Was this tweet using as few keys as possible to ironically make the argument that reducing the number of keys used in an expression at the cost of clarity and readability is a bad argument? If so I agree
1 reply 0 retweets 2 likes -
Replying to @sgrif
taking off my jokes face, or as i guess you could call it, my "bit mask", i think `!0` and `uN::MAX` are each the best in their domains, but they are nevertheless in different domains. if you work with numeric integers, use `MAX`; if you work with bitwise registers, use `!0`
4 replies 0 retweets 9 likes -
I'm out here writing 0xFFFFFFFF when I want to set a bitwise thing to all ones
1 reply 0 retweets 1 like -
Which is admittedly susceptible to me typing the wrong number of F's but
1 reply 0 retweets 1 like -
-
Lmao
1 reply 0 retweets 0 likes
Imagine going back in time before this meme and telling someone that a tweet containing just the letter F would be funny
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.