-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
add STYLEGUIDE #1443
add STYLEGUIDE #1443
Conversation
I guess this is a letter for my usual messy changes. |
|
||
## Loop | ||
|
||
Loop keywords are written as keywords, with the `:`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Don't write long macros, use the "call-with-" pattern. | ||
|
||
Don't define lists with backquote and comma, use the `list` constructor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be even better if there were some actual examples.
|
||
## Git and pull requests | ||
|
||
Please rebase and squash small commits together (you can do this with lem/legit ! ;) ). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What granularity are you assuming?
For example, is extracting functions, rename symbol, and changing to a call-with pattern too small to be included in a single commit?
Can we add a section on dynamic binding? What I'm really asking: can we ban dynamic binding unless it's really necessary?
is, IMO, a trap. Sure, you save a function parameter: on the other hand, you torpedo your ability to run code in separate threads. Obviously, it's not like avoiding dynamic binding will magically make all of our code thread safe, and Lem probably doesn't really use concurrency at the moment. But I think we should plan for the future and learn from Emacs's experience in this regard |
I too think you are right to avoid unnecessary dynamic bindings as a good code writing practice. However, dynamic bindings are thread-safe. |
Oh wow, I had no idea that bindings were thread-local. Thanks for clearing that up |
@vindarel Is it okay to merge this? |
Hi yes it is IMO, I edited it after your remarks. |
A styleguide can be beneficial to… guide new contributors.
There aren't a lot of "don't"s or "must"s.
I gathered remarks that were applied on some pull requests, and you might recognize one or two preferences of mine.
This first attempt is here for debate.