Skip to content

do-then-else semantics improvement #44

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

Open
AndreVanDelft opened this issue May 18, 2016 · 0 comments
Open

do-then-else semantics improvement #44

AndreVanDelft opened this issue May 18, 2016 · 0 comments
Labels

Comments

@AndreVanDelft
Copy link
Contributor

AndreVanDelft commented May 18, 2016

The behavior of do-then-else with a missing then or else clause is wrong and should be improved.
Up to now, a missing then or else clause would act as a then or else clause that behaves neutrally.

But the nature of do differs from the nature of if.
Suppose syntactically we could leave out both then and else clauses.
Then we should have the following equivalences:

if p   ===   if p then [] else []
do s   ===   do s then [+] else [-]

With other words:
a missing then would just propagate successes of the LHS upward.
a missing else would just propagate deactivations of the LHS upward

That needs to be implemented.
In principle this will be easy, but we need also new tests

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