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

x, y - numbers -- only if x and y appear together? #239

Open
seancorfield opened this issue Jun 13, 2022 · 1 comment
Open

x, y - numbers -- only if x and y appear together? #239

seancorfield opened this issue Jun 13, 2022 · 1 comment

Comments

@seancorfield
Copy link
Collaborator

It seems fairly common to see x & xs in destructuring where x is some arbitrary "thing" and xs is a sequence of such "things".

Yet the guide suggests x and y are typically numbers.

Perhaps we can refine this: x and y are likely to be numbers when both are present, such as [x y] when a coordinate system is implied, but x standing alone tends to mean a arbitrary thing in a lot of cases, and especially when used with xs.

I don't have a specific suggestion to improve the wording but wanted to bounce this off the editorial team to see if we can come up with something better here?

@bbatsov
Copy link
Owner

bbatsov commented Jun 13, 2022

@seancorfield I totally agree. I had originally borrowed this from https://clojure.org/dev/contrib_howto#_coding_guidelines and I didn't bother to extend the explanations, but I think this would be beneficial.

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

No branches or pull requests

2 participants