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

make style consistent in Hy source #972

Closed
gilch opened this issue Oct 16, 2015 · 1 comment
Closed

make style consistent in Hy source #972

gilch opened this issue Oct 16, 2015 · 1 comment

Comments

@gilch
Copy link
Member

gilch commented Oct 16, 2015

Should there be one blank line or two between top level forms? How many semicolons in comments in which contexts? The style guide in the documentation is silent on some issues. Should the Python "dunder" forms be rendered like --init-- or __init__ in Hy? We're just not being consistent. It varies from file to file, and sometimes within a file. When I make edits I try to be consistent with the file I'm editing, but sometimes this is hard.

The easiest way to keep this consistent given multiple developers is probably with automated style checks. We don't seem to have that set up. Perhaps Hydiomatic is a start? Has anybody tried running Hy's source through that? Can we add it to continuous integration somehow?

@Kodiologist
Copy link
Member

This is a pretty deep rabbit hole considering that the language is a moving target (inherently, in its own implementation), that we want to test code that's badly styled, and that idiosyncratic programming is the point of Lisp to begin with. Let's just make sure the code is readable, because style is only for humans; the computer running the code is unaffected. We'll have plenty to keep us busy working on Hy without trying to enforce the use of double spaces between loop clauses in lfor. Also, we've removed a lot of redundant features since this issue was originally posted, so at least it should be more obvious how to do stuff now.

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