Closed mcourteaux closed 1 week ago
Again, this is because select evaluates both sides, so your unsafe_promise_clamped calls don't actually hold
If you want an if statement, the only current way to get one is RDom::where
So if I understand well, this unsafe_promise_clamped is actually really unsafe because it behaves like a blend rather than an if-then-else?
That's right.
Okay, thanks. RTFM indeed. :stuck_out_tongue:
As a follow-up to #8301, I started using
unsafe_promise_clamped
to circumvent the bounds-inference issue. Just to double check what I was doing, I enabledcheck_unsafe_promises
, which caused my promises to be checked outside theselect()
which should represent an if-then-else.So conceptually, what I'm talking about is this:
Doesn't work with
check_unsafe_promises
as both checks end up being next to theselect()
statement, instead of being inside it.