-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Enforced ES.23 upon example code: Introduction and Philosophy #1577
base: master
Are you sure you want to change the base?
Conversation
Editors call: Thanks, you are correct that we are not consistent with ES.23 and we should be. Note that ES.23 adds: "Use So could you please change the PR to do the following:
|
Also note in line 927 there is a bug in the PR where we lost the identifier |
It seems I went over it too hastily. Thanks for pointing these out. |
Feel free to merge this PR, as I will leave it unchanged for now.
Should this not only apply when using a pre-17 standard? Which of course raises the question: |
Editors call: Looks just about ready, thanks! One last minor thing please, especially in case you are planning to next do the same for other sections of the guidelines -- please use the |
Shouldn't that be |
Good luck. |
int i {0}; is better than int i{0} . :) |
...but nothing beats
|
In particular, please don't write |
It's a shame they seem to prefer Having space around the value makes it easier to acquire at a glance because it has good visual blocking. Blocking is crucial to how most people perceive structure, from which we use derive visual meaning. Contextual color-coding in fancy editors can help, but structure is typically the primary mechanism which is why it's such an important aspect of visual design.
Edit: the distinction is less pronounced here because the font on this page seems to distend the Though it's only an anecdote, I've heard strong preference for
But ultimately, it doesn't matter. The (local maximum) "best" style is the one that you can convince people to apply consistently... |
I noticed much of the example code does not (yet) follow rule ES.23.
So I replaced occurrences of the form
int x = 1;
with theint x{ 1 };
form.