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

Unified Style Specification #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions text/0000-unified-style-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- Feature Name: `unified_style_spec`
- Start Date: 2023-09-29
- RFC PR: [nushell/rfcs#0007](https://github.com/nushell/rfcs/pull/7)
- Nushell Issue: [nushell/nushell#0000](https://github.com/nushell/nushell/issues/0000)

# Summary
[summary]: #summary

We do not have a unified style for the Nu language like Rust has.
This RFC is to see what the community thinks of adding one, NOT what that spec would look like. That development would be done on it's own.

# Motivation
[motivation]: #motivation

While discussing major work on the Nu language formatter, AucaCoyan mentioned that there is no standardization of style.
Creating a robust formatter requires an equally robust style specification.
Making sure everyone is happy with a new standard existence is important.

# Guide-level explanation
[guide-level-explanation]: #guide-level-explanation

This RFC is not about the spec itself just about the idea of creating one.

# Reference-level explanation
[reference-level-explanation]: #reference-level-explanation

Same as above.

# Drawbacks
[drawbacks]: #drawbacks

None that I can think of. Please let me know any that may pose issues in the future.

# Rationale and alternatives
[rationale-and-alternatives]: #rationale-and-alternatives

Without a stalwart specification, different projects across nushell will tend to have subtle (or even major) differences that decrease the readability and maintainability of Nu code.

# Prior art
[prior-art]: #prior-art

Rust already has a style guide, crafted by the community. There doesn't seem to be any downsides because the formatter allows you to customize what rules to follow.

# Unresolved questions
[unresolved-questions]: #unresolved-questions

- What the specification would look like.
- How the style specification would interact with an eventual language specification.

# Future possibilities
[future-possibilities]: #future-possibilities