-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fatal Exceptions #2933
Comments
In most languages, raise/throw is a builtin keyword. Tbh I'm not sure why, maybe because it's not an expression and most typed languages don't have Typescript's In Squiggle it seems fine to make it an expression; |
Sorry, I don't fully follow. Let's discuss tomorrow. One nice thing about using a simple function is that it would be ~trivial to get started with. |
Second paragraph is not directly connected to the first, sorry for not making it clearer. I was just thinking out loud about the syntax. In the approach where we add a keyword, there's the difference between:
And:
In the first example, In the second example, Throw/raise is usually a statement, in Python or JS, but in current Squiggle there's no need for statement-level throw, because if you statement-level-throw then your function will always throw (we don't have early returns), and then you could just throw in the end expression. |
|
Description of suggestion or shortcoming:
Maybe something like,
This raises the error immediately.
Seems simple enough.
The text was updated successfully, but these errors were encountered: