Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: error states #12

Open
mmastrac opened this issue Jul 15, 2021 · 1 comment
Open

Feature: error states #12

mmastrac opened this issue Jul 15, 2021 · 1 comment
Milestone

Comments

@mmastrac
Copy link
Owner

mmastrac commented Jul 15, 2021

All errors are currently fatal, but we could be adding either error states (like Rust's Result) or try/catch keywords.

@mmastrac
Copy link
Owner Author

Possible forms for error states:

var f = file.open("foo.txt")?;
var s = file.read();
if let error(e) = s {
  // ...
} else if let ok(e) = s {
  // ...
}

Eventually this will allow us to use constructs like match, and the syntax will also work with optional types.

@mmastrac mmastrac added this to the Kalos 0.9 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant