Jamey Sharp on Nostr: nprofile1q…0vyme It's really cool to see how somebody else interpreted the language ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq7gdyhkh7kvf5vk8junsl8yltr5ux3ck7sqlf6nzceg52584uzcsss0vyme (nprofile…vyme) It's really cool to see how somebody else interpreted the language semantics based on seeing examples of how it's used, and then contrasting that with what the spec actually says. Thanks for sharing!
It now occurs to me that the pattern guards in match statements could conceivably be allowed in other pattern contexts too, and I wonder whether that would be a good idea. It might make sense now that we have "let … else", although "let foo if foo != 2 = bar else {…}" seems confusing, and not super useful since you can always rewrite that to "if foo == 2 {…}" after binding instead. And I think "if let foo if foo != 2 = bar" would be too confusing to let anyone use ever…
It now occurs to me that the pattern guards in match statements could conceivably be allowed in other pattern contexts too, and I wonder whether that would be a good idea. It might make sense now that we have "let … else", although "let foo if foo != 2 = bar else {…}" seems confusing, and not super useful since you can always rewrite that to "if foo == 2 {…}" after binding instead. And I think "if let foo if foo != 2 = bar" would be too confusing to let anyone use ever…