Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Mark if let as experimental #39

Merged
merged 2 commits into from
Jul 11, 2020
Merged

Mark if let as experimental #39

merged 2 commits into from
Jul 11, 2020

Conversation

IwanKaramazow
Copy link
Contributor

if let Error(x) = result {
  Js.log("The sky is red")
} else if let Ok(y) = result {
  Js.log("The sky is blue")
} else {
  Js.log("no sky")
}

image

@chenglou
Copy link
Member

Yeah this needs a bit more caution. Since it's additive we can postpone it until we work out the stance on the compiler warnings, the actual behavior of else if let, how to prevent abuse of this syntax, etc.

@chenglou
Copy link
Member

Also this flexes the error messages system so much. This is great

@IwanKaramazow IwanKaramazow merged commit 7b646ad into master Jul 11, 2020
@IwanKaramazow IwanKaramazow deleted the MakeLetExperimental branch July 11, 2020 07:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants