Skip to content

Editorial: unify various forms of if-otherwise in single-line conditionals #3653

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tontonialberto
Copy link
Contributor

Partially fixes #3648.

The following occurrences

  • If cond, s1. Otherwise s2
  • If cond, s1. Otherwise, s2
  • If cond, s1; otherwise, s2

have been replaced with If cond, s1; otherwise s2.

Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hit semantic satiation on "otherwise" about 20% of the way through this PR, but I'm pretty sure it's an improvement.

@jhnaldo
Copy link
Contributor

jhnaldo commented Jul 18, 2025

The esmeta tycheck error in this PR looks a bit odd. I’ll look into it.

@jhnaldo
Copy link
Contributor

jhnaldo commented Jul 18, 2025

I fixed the bug in ESMeta v0.6.3. After merging #3656, I hope this PR passes the esmeta typecheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforce the use of only one keyword between else and otherwise
4 participants