-
Notifications
You must be signed in to change notification settings - Fork 1
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
Formatting let bindings #8
Comments
I vote for aligning ”simple” let bindings and handle the destructuring ones differently. What that ”differently” means is another matter. What are some common patterns in use out there? |
As with #7 there is the issue of enforcing alignment might make adding bindings cause some diff tools to report more differences than really are there. |
Cursive just puts one space between the binding and the init-form: (let [subject-date (js/goog.date.DateTime.)
a nil
{:keys [x y z ab]} {}]
... |
What I started to think about was rather how people format the destructurings, but maybe that is just following any rules for maps and vectors? |
Ah right, yes that's also another thing to consider, and would probably end up being treated the same. |
Similar to #7 on formatting maps, how should let bindings be formatted? Should all of the
init-form
s (right hand side) be aligned, or have a ragged alignment?Should lines that are destructuring collections be handled differently? They can get very long and would cause large gaps in
let
bindings if they were included.The text was updated successfully, but these errors were encountered: