Skip to content

do-then-else semantics improvement #44

Open

Description

@AndreVanDelft

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions