We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following program using a space to separate two operations (both in their definition and implementation) is currently syntactically valid:
interface Foo { def foo(): Int def bar(): Int } def main() = try { do foo() + do bar() } with Foo { def foo() = resume(42) def bar() = resume(100) }
Inserting semicolons in order to separate the two operations is not allowed: neither in their definition, nor in their implementation.
In contrast, if you write:
type Quux { Bar() Baz() }
then you actually must insert a semicolon or a newline to get a successful parse.
The text was updated successfully, but these errors were encountered:
Related to #287, as the following suggestion would make it a little bit more symmetric:
sequence constructors not with semicolons type B { True(); False() } but type B { case True() case False() }
type B { True(); False() }
type B { case True() case False() }
Sorry, something went wrong.
Maybe one more reason why it feels surprising:
def helloWorld() = { def foo() = println("hello") def bar() = println("goodbye") foo(); bar() }
does not parse here (requires a newline between the two definitions), but parses fine in the cases outlined above.
No branches or pull requests
The following program using a space to separate two operations (both in their definition and implementation) is currently syntactically valid:
Proof
Inserting semicolons in order to separate the two operations is not allowed: neither in their definition, nor in their implementation.
In contrast, if you write:
then you actually must insert a semicolon or a newline to get a successful parse.
The text was updated successfully, but these errors were encountered: