News for hackers. Stuff that matters.
Re:Why Timothy Cain creator of Fallout left Fallout 2 during... by derefr on Saturday May 27, 2023 @08:24PM (#36099883)
x <= y isn't two tests.

In a low-level sense, branch-if-greater-or-equal is one instruction even on RISC machines — and not one any more "complex" than branch-if-greater.

In an abstract boolean-algebra sense, x <= y is the same as !(x > y).

Re:Why Timothy Cain creator of Fallout left Fallout 2 during... by zabzonk on Saturday May 27, 2023 @08:54PM (#36100037)
> x <= y is the same as !(x > y)

i.e. two tests, or perhaps i should say logical operations. i'm not saying don't use '<=', but do check that it is doing what you think it should.

Re:Why Timothy Cain creator of Fallout left Fallout 2 during... by derefr on Saturday May 27, 2023 @09:05PM (#36100108)
Let me put it another way: the following are the same code:

if: x <= y, do: foo(), else: nothing()

if: y < x, do: nothing(), else: foo()

Re:Why Timothy Cain creator of Fallout left Fallout 2 during... by AugurCognito on Sunday May 28, 2023 @03:43AM (#36102001)
Shouldn't the last statement be:

if: y > x, do: nothing(), else: foo()

Re:Why Timothy Cain creator of Fallout left Fallout 2 during... by rurban on Sunday May 28, 2023 @10:42AM (#36104392)
Nope, order of evaluation might matter with impure code.
Re:Why Timothy Cain creator of Fallout left Fallout 2 during... by rowanG077 on Wednesday May 31, 2023 @08:50AM (#36137745)
How exactly? Well there is an extreme case where x and y are volatile but even then the order is implementation defined so I can't see a world where it matters.