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

Fail fast instead of assigning an error value #52

Open
jkeiser opened this issue Mar 5, 2019 · 0 comments
Open

Fail fast instead of assigning an error value #52

jkeiser opened this issue Mar 5, 2019 · 0 comments
Labels

Comments

@jkeiser
Copy link
Member

jkeiser commented Mar 5, 2019

Right now, a = 1/0; 10 returns 10. With this change, a would not be assigned and the expression would return a divide by zero error.

The original effect can still be achieved using a = { 1/0 }; 10, and this matches intuitions that errors will always fail fast (unless you explicitly make them lazy).

It also allows a = 1 to be handled in operator overloads, because the main blocker up to this point was adding an error location to the value.

@jkeiser jkeiser added the to do label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant