-
Notifications
You must be signed in to change notification settings - Fork 42
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
Don't use inline code for the Boolean values #3565
base: master
Are you sure you want to change the base?
Conversation
To is how we do it in the vast majority of cases, and is consistent with not using code style for numeric values. Inspired by a styling mistake made in modelica#3561.
To me it would intuitively make sense to also use inline code for Boolean values, if we actually write them. I could understand if we made an exception so that "is false" would be ok as non-code -- with the interpretation that it is a general English "false", not "false" in Modelica. The downside of that is that it is too subtle. But I don't see a similar case if used more directly (like the 1st change in that file). Note that the C++-standard also has false and true as inline code. |
To me, if you talk about default values or values, it would make sense to use the inline false or true. So, I would prefer the style that we had before this change. |
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.
Except for one case, I would prefer the old style.
To me, this piece of text is general mathematics/logics, and should hence not be formatted as if it were Modelica.
Yes, I would expect any standard documents for a programming language with built-in literals for the Boolean values to at least sometimes make source code. However, I doubt that the C++ standards format every occurrence of true and false as source code. |
I disagree. If we introduce an annotation
For the C++23 draft the first 26 occurrences of The difference is that the 27th one states that when a relationship is false (in the English sense), the corresponding value is |
What does this have to do with
|
So they got it right! |
I mixed up which commit in the PR was discussed here, and as that was the proposed change in annotations.tex I assume you agree that it shouldn't be made, right?
This depends on whether we discuss P as having values according to Modelica or in some other sense. The current specification clearly has P with values according to Modelica. |
According to today's phone meeting decision.
Updated according to today's phone meeting. Re-requesting reviews. |
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.
Ok
To is how we do it in the vast majority of cases, and is consistent with not using code style for numeric values.
Inspired by what appears to be a styling mistake made in #3561. I checked for occurrences of the following to conclude that the style we use is plain English:
is true
is \lstinline!true!
is false
is \lstinline!false!
It should be noted that there is still a number of cases of just
\lstinline!false!
and\lstinline!true!
that would be good candidates to also turn into plain English. However, there are also cases where I think it is clear that code style should be used, so it isn't as simple as turning them all into plain English. Here's an example of the latter:Perhaps we should try to write down a some guideline in the style guide?