3 ms·
> We stole it from Swift. Stole is probably too harsh a statement given the semantics are pretty different: Swift's if-let has closer semantics to TFA's as it
by masklinn 8y ago
> We stole it from Swift.
Stole is probably too harsh a statement given the semantics are pretty different: Swift's if-let has closer semantics to TFA's as it only works with Optional but allows multiple patterns (bindings in TFA's version) while Rust's works with any pattern but only allows a single pattern (AFAIK).
- steveklabnik 8y agoI believe thats right, yeah. And sure, you could make that argument, but in terms of how it happened, it was largely “oh, that looks good. We should do that.” So maybe we modified it a bit, but still. :)
- dilap 8y agonothing wrong with stealing! great artists and all that. :-)