Elektrine lite

← Feed

@oli@hachyderm.io

Post #2227728

2025-11-19 08:06 UTC

@bugaevc@floss.social @Mara@hachyderm.io So... || is just a postfix closure with no `.`, conditionally invoked on the lhs producing a failure value (right now only `false` is supported 😀)

Replies (1)

  • @bugaevc@floss.social 2025-11-19 10:08

    @oli@hachyderm.io @Mara@hachyderm.io it's not a closure since it can contain control flow, and also likely do things that borrow checker wouldn't like a closure doing. It was desugared to explicitly query the LHS whether or not to short circuit, and run the RHS if not. https://internals.rust-lang.org/t/pre-rfc-overload-short-curcuits/10460/29

    Open ##2227729