Open kjx opened 5 months ago
Thanks for the feedback. I believe you're correct that the current behavior is confusing. I believe intuitive syntax is critical for a compelling language and I hope we can prioritize improving this. If you have suggestions for what it should look like, they're very welcome.
Marking as enhancement instead of bug, since this is documented behavior.
also: why does forall statement use "old-ish" syntax forall x | x in xs not newer forall x <- xs
FWIW you can definitely use the new syntax in forall statements too, it's just the other syntax mismatches that made it look unsupported:
forall x <- xs ensures x > 10 {
reveal someRandomThing();
}
hah. good to know that at least...
Dafny version
4.6.0
Code to produce this issue
Command to run and resulting output
What happened?
at the very least: "this symbol not expected at this point in your program" :-) not "not expected [at all, ever] in Dafny"
also: why does forall statement use "old-ish" syntax
forall x | x in xs
not newerforall x <- xs
whyensures
not::
why noby
between the expression and the justification block(compare
assert e by {}
, especiallyassert forall x <- xs :: e by { justification(); }
versus pretty much the same thingforall x <- xs ensures e { justification(); }
What type of operating system are you experiencing the problem on?
Mac