830
you are viewing a single comment's thread
view the rest of the comments
[-] QuazarOmega@lemy.lol 24 points 8 months ago

We can optimize this further:

unsatisfied = true
while(unsatisfied) {
    key.dispatch(
        Keyboard::Ctrl,
        Keyboard::s
    )
}

..No, there is no instance where unsatisfied changes state

[-] backhdlp@iusearchlinux.fyi 4 points 8 months ago

You should just be able to while(true)

[-] Octopus1348@lemy.lol 9 points 8 months ago
[-] Tja@programming.dev 3 points 8 months ago

That sounds like an excuse.

[-] halfway_neko@lemmy.dbzer0.com 4 points 8 months ago

Don't worry, most modern brains have a builtin jit compiler, so when a habit starts to form, the check will be optimised out. (It saves excess neurons from being generated.)

load more comments (1 replies)
this post was submitted on 03 Feb 2024
830 points (97.4% liked)

Programmer Humor

19315 readers
40 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