Skip to content
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

Rework handling of if expressions #80

Merged
merged 3 commits into from
Oct 11, 2024
Merged

Conversation

jackfirth
Copy link
Contributor

Closes #75. Repeat attempt of #77, this time without the splash damage on normal function application.

Closes sorawee#75. Repeat attempt of sorawee#77, this time without the splash damage on normal function application.
@jackfirth jackfirth marked this pull request as ready for review October 11, 2024 03:59
(let loop ([pos 0]
[l (append field-names private-field-names)])
(if (null? l) null (cons pos (loop (add1 pos) (cdr l)))))]
[(local-field-pos ...) (let loop ([pos 0]
Copy link
Owner

Choose a reason for hiding this comment

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

@jackfirth this is what I told you earlier... Probably there should be a newline here. But let's not worry about it in this PR.

@@ -2188,7 +2202,10 @@ last few projections.
(null? augride-names)
(null? final-names))]
[no-new-fields? (null? public-field-names)]
[xappend (lambda (a b) (if (null? b) a (append a b)))])
[xappend (lambda (a b)
Copy link
Owner

Choose a reason for hiding this comment

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

This one, too. Though I feel it could go either way in this specific case (perhaps because the LHS is just a single identifier?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one I would write on the next line too. In general, I strongly prefer adding linebreaks at the highest level of nesting first, even if that means more vertical space is used overall.

@sorawee sorawee merged commit 5d76153 into sorawee:master Oct 11, 2024
4 checks passed
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.

Better if readability
2 participants