Skip to content

Automated Resyntax fixes#771

Closed
resyntax-ci[bot] wants to merge 7 commits intomasterfrom
autofix-113-1
Closed

Automated Resyntax fixes#771
resyntax-ci[bot] wants to merge 7 commits intomasterfrom
autofix-113-1

Conversation

@resyntax-ci
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Sep 28, 2025

Resyntax fixed 20 issues in 6 files.

  • Fixed 7 occurrences of instantiate-to-new
  • Fixed 6 occurrences of let-to-define
  • Fixed 2 occurrences of instantiate-to-make-object
  • Fixed 2 occurrences of if-begin-to-cond
  • Fixed 1 occurrence of string-append-with-format-to-format
  • Fixed 1 occurrence of nested-when-to-compound-when
  • Fixed 1 occurrence of for-each-to-for

Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `for-each` operation can be replaced with a `for` loop.
Nested `when` expressions can be merged into a single compound `when` expression.
This `string-append` with `format` expression can be simplified to a single `format` call.
The `instantiate` form is for mixing positional and by-name constructor arguments. When no positional arguments are needed, use `new` instead.
The `instantiate` form is for mixing positional and by-name constructor arguments. When no by-name arguments are needed, use `make-object` instead.
Using `cond` instead of `if` here makes `begin` unnecessary
@rfindler
Copy link
Member

I'm not a fan of the change in "Fix 1 occurrence of string-append-with-format-to-format" here.

@rfindler
Copy link
Member

I cherry picked the rest of the commits, so I'll close this PR.

@rfindler rfindler closed this Sep 28, 2025
@jackfirth
Copy link
Collaborator

Oof yeah that one definitely isn't ideal. I'll try to make some improvements there.

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.

2 participants